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
Next, Sue decides to embed a chart from Microsoft Word. She copies and pastes data from a table that she has already created in
antoniya [11.8K]

Answer:

Its D

Explanation:

On Edg

8 0
3 years ago
The following is a mock-up of a Battleship game board. The square with a X marks the position of a battleship.
Verizon [17]

Answer:

Row B column 2

Explanation:

X is directly underneath column 2 and the row is B

3 0
2 years ago
Why is voice encryption an important digital security measure?
NISA [10]

Answer: Voice encryption is the end to end encryption/encoding of the the communication taking place through the telephone or mobile devices. The encryptors of voice turn the communication conversation into the digital form which result in stream of bits.

Digital security is the protection and securing of the  devices related with the mobile and online technology. It is important to maintain the security of the information conveyed through the communication. It maintains the protection from the online stealing of the data and fraud.

4 0
3 years ago
What type of laptop display technology provides fast refresh rates with relatively little power and does not require a backlight
saveliy_v [14]

Answer:

LCD

Explanation:

Liquid Crystal Display

3 0
3 years ago
Cual era la situacion de los indigenas durante la guerra de reforma<br>​
Colt1911 [192]

Answer:

ola tá sgsgndndjjsjsnsnsnsnsnsnsn

6 0
3 years ago
Other questions:
  • _______ refers to the poitically, religiously, or ideologically motivated use of computers (or related technology) by an individ
    15·1 answer
  • You are manually configuring a tcp/ip host. another administrator gives you the router's ip address. what is the tcp/ip term for
    6·2 answers
  • ​ In addition to analyzing logic and program code, a project team usually holds a session with users, called a _____, to review
    5·1 answer
  • :If a process terminates, will its threads also terminate or will they continue to run? Explain your answer.
    14·1 answer
  • In terms of object-oriented programming, after a class is defined,
    11·1 answer
  • What is blogging
    15·2 answers
  • Https://www.blooket.com/play?id=300932<br> please
    8·2 answers
  • Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
    7·1 answer
  • If you were an architect planning on building a large scale Municipal complex what type of engineer would you identify as essent
    10·1 answer
  • An informative presentation can be used for conducting a classroom discussion.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!