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
Suppose there are 69 packets entering a queue at the same time. Each packet is of size 7 MiB. The link transmission rate is 1.7
svp [43]

Answer:

69.08265412 milliseconds

Explanation:

Lets first convert 7 MiB to bits

7*1024*1024*8=58720256 bits

Now convert bits to Gbits

58720256/10^{9}  =0.058720256 Gbits

Queuing Delay = Total size/transmission link rate

Queuing Delay= \frac{0.058720256}{1.7} =0.03454132706 seconds

Delay of packet number 3 = 0.03454132706*2=0.06908265412 seconds

or 0.06908265412= 69.08265412 milliseconds

7 0
3 years ago
Timeliness is an important goal of any access control monitoring system.<br> A. True<br> B. False
Damm [24]
The answer for this question is true
7 0
3 years ago
What kind of operating system is MS-DOS?
ELEN [110]

MS-DOS is a command-line operating system.

Therefore, the best answer is Command-line.

8 0
3 years ago
Read 2 more answers
Find the propagation delay for a signal traversing the in a metropolitan area through 200 km, at the speed of light in cable (2.
Ede4ka [16]

Answer:

t= 8.7*10⁻⁴ sec.

Explanation:

If the signal were able to traverse this distance at an infinite speed, the propagation delay would be zero.

As this is not possible, (the maximum speed of interactions in the universe is equal to the speed of light), there will be a finite propagation delay.

Assuming that the signal propagates at a constant speed, which is equal to 2.3*10⁸ m/s (due to the characteristics of the cable, it is not the same as if it were propagating in vaccum, at 3.0*10⁸ m/s), the time taken to the signal to traverse the 200 km, which is equal to the propagation delay, can be found applying the average velocity definition:

v = \frac{(xf-xo)}{(t-to)}

If we choose x₀ = 0 and t₀ =0, and replace v= 2.3*10⁸ m/s, and xf=2*10⁵ m, we can solve for t:

t =\frac{xf}{v}  =\frac{2e5 m}{2.3e8 m/s} =8.7e-4 sec.

⇒ t = 8.7*10⁻⁴ sec.

4 0
3 years ago
​your business has a web server that has suddenly become unresponsive. when you study the server's logs there are a huge number
kvasek [131]
there's a chance the web server could quite possibly be backed up from all the requests and not being cleaned or updated often
8 0
2 years ago
Read 2 more answers
Other questions:
  • Does a soda vending machine Give reciepts?<br><br>need for computer science hw
    7·2 answers
  • This activity will help you meet these educational goals:
    7·2 answers
  • Which of the following statements is correct?
    11·1 answer
  • Three homework questions I can't figure out, please help?
    11·1 answer
  • Can include the 5-tuple information, which is the source and destination ip addresses, source and destination ports, protocols i
    9·1 answer
  • AWT
    7·1 answer
  • Why must you be careful when handling a hard drive?
    10·1 answer
  • Your wireless network consists of multiple 802.11n access points that are configured as follows: SSID (hidden): CorpNet Security
    8·1 answer
  • 10010 - 1011 binary subtraction​
    5·1 answer
  • Common names for computer-based information systems are transaction processing, management information, ________, and executive
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!