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]
2 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]2 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
What is the best wi-fi name you have ever seen?
elena-s [515]

Answer:

bill wi the science fi

Explanation:

8 0
2 years ago
2) A ________ uses electronic memory and has no motors or moving parts. A) mechanical hard drive B) solid-state drive C) Blu-ray
grin007 [14]

Answer:

A.mechanical hard

Explanation:

brainliest me and follow ty

7 0
2 years ago
What does a virus do to a computer? How can it be fixed?
miv72 [106K]
A virus can do many things from burn up your hard drive to just annoy you with ads. the best thing you can do if you think you have one is take it to a professional
4 0
2 years ago
The next four octal numbers after 36 is:________.
Papessa [141]

Answer: b. 37, 40, 41, 42

Explanation:

The next four octal numbers after 36 is 37, 40, 41, 42.

The octal numeral system, which is also referred to as "oct" for short, is simply base-8 number system.

It is a number system whereby only digits from 0 to 7 are used and there are no letters or numbers that are above 8 that are used.

In this case, after 36, the next number will be 37 after which we go to 40 as we can't write 38 in the octal system. Therefore, the next four octal numbers after 36 is 37, 40, 41, 42.

7 0
3 years ago
Mad libs are activities that have a person provide various words, which are then used to complete a short story in unexpected(an
Vsevolod [243]

did you just put random a*s word together and expect us to know the ¨answer¨

5 0
2 years ago
Other questions:
  • Consider a multiprocessor CPU scheduling policy. There are 2 options: 1) a singlecommon ready queue of jobs; when a CPU becomes
    8·1 answer
  • Please answer fast screenshot included - thanks in advance
    11·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • Senior executives at a global manufacturing company are determining the key performance indicators they'll use to judge how effe
    15·1 answer
  • after placing her insertion point after grandma's kitchen, order the steps Danica needs to follow to insert and format the regis
    12·2 answers
  • Can I use some Company's name in my Research Project. For example, my research is based on E-commerce security and i wanna use A
    14·1 answer
  • Cloud computing is an old phenomenon in computing infrastructure dating back to the early days of the Internet that involves mov
    10·1 answer
  • Open the NetBeans IDE and create a new project named MySizes.java. Your program should do the following:
    9·1 answer
  • 4. In paragraph 7, what is the meaning of the phrase "not
    13·1 answer
  • Which of these is a negative effect of computer technology's role in creating
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!