1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Basile [38]
3 years ago
12

Write a method named circleArea that accepts the radius of a circle as a parameter (as a real number) and returns the area of a

circle with that radius. For example, the call of area(2.0) should return 12.566370614359172. You may assume that the radius passed is a non-negative number.
Computers and Technology
1 answer:
lions [1.4K]3 years ago
6 0

Answer:

  public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

Explanation:

Find the complete program in java that prompts the user to enter a value for radius, stores it in a variable, calls the method circleArea() and passes the value for the radius, then displays the area.

import java.util.Scanner;

public class CocaColaVendingTest {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Please enter the value for radius");

       double r = in.nextDouble();

       //Calling the method circleArea()

       double calcArea = circleArea(r);

       System.out.println("The Area is: "+calcArea);

   }

   public static double circleArea(double radius){

       double area = 3.142*Math.pow(radius,2);

       return area;

   }

}

You might be interested in
Photographing during the midday can produce which of the following?
bija089 [108]

Answer:

great lighting

great emotion

great setting

great feeling

5 0
3 years ago
Requests to access specific cylinders on a disk drive arrive in this order: 24, 20, 4, 40, 6, 38, and 12, and the seek arm is in
GarryVolchara [31]

Answer:

The time required to seek using First come,first served algorithm is 876 milliseconds.

The time required to seek using Shortest Seek Time First algorithm is 360 milliseconds.

The time required to seek using LOOK (initialing moving upwards) algorithm is 348 milliseconds.

Explanation:

Part a,b : First-come, first-served:

The order of the cylinders is as 10, 22, 20, 2, 40, 6, 38

10 + 12 + 2 + 18 + 38 + 34 + 32 = 146 cylinders = 876 milliseconds.

ii) Shortest Seek Time First:

The order of the cylinders is as 20, 22, 10, 6, 2, 39, 40

0 + 2 + 12 + 4 + 4 + 36 + 2 = 60 cylinders = 360 milliseconds.

iii) LOOK (initialing moving upwards):

The order of the cylinders is as 20, 22, 38, 40, 10, 6, 2

0 + 2 + 16 + 2 + 30 + 4 + 4 = 58 cylinders = 348 milliseconds.

7 0
3 years ago
which of the following notational systems is most likely used to represent a mac address? correct answer:
vladimir2022 [97]

The notation used to represent MAC address is hexadecimal number.

Media access control address (MAC address) is a unique address assigned to a network interface controller (NIC) or network adapter. MAC addresses are also known as hardware addresses or physical addresses.

MAC addresses are 12-digit hexadecimal numbers (48 bits or 6 byte in length). MAC address allow computers to uniquely identify themselves.

Therefore hexadecimal numbers are used to represent MAC address.

Find out more at: brainly.com/question/2868676

3 0
2 years ago
A ____ is an unknown network.
Grace [21]

Answer:

its called a anonymous network

4 0
3 years ago
$
IrinaK [193]

Answer:

Windows media video

Explanation:

it is the most recognizable video compression format within the WMV family

4 0
2 years ago
Read 2 more answers
Other questions:
  • What operator is used to create a validation rule? A. – B. / C. < or > D. +
    12·1 answer
  • Gary lives in an area that receives high rainfall throughout the year. Which device would be useful to him to maintain his compu
    10·2 answers
  • HELP! I am trying to get my google account back for school and business, can someone help?
    9·1 answer
  • Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
    7·1 answer
  • 3. SmartArt can be used to create that highlight relationships between two items.
    15·1 answer
  • The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
    10·2 answers
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    12·1 answer
  • A sequence of repetitive operations performed to evaluate the ability of a PC to operate at peak efficiency for a defined time p
    15·1 answer
  • . It has been said that technology will be the end of management. Maybe. How about artificial intelligence
    9·1 answer
  • Which of the following is an example of two-factor authentication?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!