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
Demographics and psychographics influence database marketing.<br><br><br> False<br><br> True
Kamila [148]

Answer:

true is the correct answer

5 0
2 years ago
Which of the following is NOT a computer peripheral?
Marianna [84]

Answer:CPU stands for the central processing unit. CPU is not a peripheral device.

Explanation:

CPU stands for the central processing unit. CPU is not a peripheral device.

7 0
1 year ago
What was designed as an area where computer vendors could store data that is shielded from user activities and operating system
Nataliya [291]

Answer:

host protected area

Explanation:

7 0
2 years ago
List any ten keyboard symbols.​
Nostrana [21]

Answer:

Esc- Esc (escape) key.

F1 - F12 What are the F1 through F12 keys?

F13 - F24 Information about the F13 through F24 keyboard keys.

Tab Tab key.

Caps lock- Caps lock key.

Shift- Shift key.

Ctrl - Control key.

Fn- Function key.

Alt- Alternate key (PC only; Mac users have an Option key).

Spacebar- Spacebar key.

Hope this helps, have a great day/night, and stay safe!

3 0
2 years ago
Royalty free images are those in which the price of the license is determined by the use of the image.
shusha [124]
No they are images that are free to use as long as your not using them to make profit and you give credit to the person who owns the image.
5 0
3 years ago
Read 2 more answers
Other questions:
  • What type of Windows Server is the most likely server to be targeted by a computer hacker?
    13·2 answers
  • Assume that x is a double variable that has been initialized. Write a statement that prints it out, guaranteed to have a decimal
    5·1 answer
  • 3. Describe what a pre-processor does in a network-based IDS tool such as Snort. Demonstrate your understanding of this function
    6·1 answer
  • True or false? if the copyright date on the homepage is more than 1 year old, the website should always be considered unmaintain
    5·1 answer
  • Write the simplest statement that prints the following on a single line: 3 2 1 Go! Note: Whitespace (blank spaces / blank lines)
    11·1 answer
  • Please help
    11·1 answer
  • If someone said to you, “Pseudocode is a waste of time! It’s just more work because you end up writing the same program twice,”
    8·1 answer
  • List 10 examples of computer ethics<br>(please give even 1 if you can, I need it urgently) ​
    10·1 answer
  • burger hut is trying to decide if it can receive money from the government for providing employees with insurance .
    6·1 answer
  • The current annual interest rate is 5 percent, and you are taking out a 20-year loan with a monthly end-of-month payment. If you
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!