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
How can parents be health educators in family​
Fudgin [204]

Answer:

They can be health educators in family because they are your parents.

Explanation:

The reason why is because since they are your parents that means they have kids, so they probably know the ins and outs of parenting and running a family.

7 0
3 years ago
Which statement best describes the cut and paste option in a word processor?
tekilochka [14]

B i correct so yea and yea

8 0
3 years ago
Read 2 more answers
How do you think computers have helped to improve documentation, support and services within the healthcare industry.
RideAnS [48]

Computers are the excellent means for storage of patient related data.It is often necessary to maintain detailed records of the medical history of patients. Doctors often require the information about a patient's family history, physical ailments, already diagnosed diseases and prescribed medicines.
8 0
3 years ago
Read 2 more answers
In which of the following ways can using test-taking tips help you?
bogdanovich [222]
In my opinion i think it is A
3 0
3 years ago
Type dig www.example A in order to get the IP address of www.example. What’s the TTL of the A record returned in the response? W
fiasKO [112]

Answer:

Your computer now has the IP address of that website cached, and no longer has to lookup the IP address of that domain name. The TTL of the first query is bigger than the TTL of the second query as less time was taken to execute the request.

Explanation:

On the first request to the website, the computer needs to contact other machines to find the record of the IP address.

On the second request, the computer already has the IP address and can use that to connect.

6 0
3 years ago
Other questions:
  • Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks a
    12·1 answer
  • Which information is considered free for use?
    9·2 answers
  • what notation system supports presenting the largest numbers using fewest digits; Binary, decimal or hexadecimal?
    11·1 answer
  • When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the accoun
    10·1 answer
  • What does the FixedUpdate loop do? Why do developers use it?
    14·1 answer
  • System. Construct an ER diagram for keeping records for exam section of a college.​
    10·1 answer
  • Any action that causes harm to your computer is called a
    15·1 answer
  • Which of the following number is divisible by 3? (340 , 432 , 113)​
    7·1 answer
  • The most significant concerns for implementation of computer technology involve _______, security, and ethics. accuracy property
    10·1 answer
  • What are some of the characteristics found in an editorial photograph?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!