Write a method that has the radius of the circle passed

Assignment Help Basic Computer Science
Reference no: EM13306354

Write a method that has the radius of the circle passed into it. It computes the area, and returns the area to the main method.
Also, write a line of code that might "call" the method from the main method. Example: x = theMethod(z);

This is what I have so far:
public class Circle {
public static double circleArea (double radius) {
double area = radius * radius * Math.PI ;
return area ;
}
// Main method
public static void main(String[ ] args) {
double radius = 0
try{

 

Reference no: EM13306354

Questions Cloud

Determine what is the adiabatic efficiency of the turbine : At the inlet the steam is at 1 MPa and 320 C, and leaves the turbine at 20 kPa. The work output of the turbine is measured to be 600 kJ/kg (of steam passing through the turbine).
What is the minimum nonzero thickness of the film : A piece of glass has a thin film of gasoline floating on it. A beam of light is shining perpendicular on the film. what is the minimum nonzero thickness of the film
Why timer can be source of repetition instead of looping : In java such as an event driven programming such as building a simple screen saver explain why the timer can be the source of repetition instead of looping and why is it better?
Determine humidity ratio-dew point and mass of dry air : An air-water vapor mixture at 0.1 MPa, 35 C and 70% relative humidity occupies a volume of 100 m^3 Determine the humidity ratio, the dew point, the mass of dry air in the volume and the mass of water vapor in the volume.
Write a method that has the radius of the circle passed : Write a method that has the radius of the circle passed into it. It computes the area, and returns the area to the main method.
What is the total kinetic energy of the disk : A solid disk (mass = 5 kg, R=0.6 m) is rolling across a table with a translational speed of 9 m/s. What is the total kinetic energy of the disk
Consider the reasons why firms may want to diversify and : Consider the reasons why firms may want to diversify and provide a critical assessment of the economic validity of their reasons for diversifying
Calculate the entropy change of the universe that occurs : The tank is insulated on the outside and the partition between the two sections is also an insulator. The partition can withstand a pressure differential across it of 400 kPa, before rupturing.
Determine what would be the total consolidation settlement : A normally consolidated clay layer in the field has a thickness of 3.2 m with an average effective stress of 70 kN/m^2. A laboratory consolidation test on the clay gave the following results: Pressure (kN/m^2)=100, 200 Void Ratio=0.905, 0.815

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Key factors limiting use of personalization

Two key factors limiting the use of personalization to more precisely target marketing efforts to individual customers are?

  Draw the von neumann cycle and explain the basic function

Draw the Von Neumann Cycle and explain the basic function carried out in each state.

  Perform analysis and prove new bounds

For each of these sublists, the median is found. Further, the median of these medians is found and returned as the pivot. Perform the analysis and prove the new bounds.

  Why software products has successful growth strategy

Software products like Linux be a successful growth strategy in "brutally competitive marketplace" in which it operates? Explain why or why not?

  Design complete system of timer using 8086 and peripherals

Real-time systems often require precise timing for data sampling and control operations. This is usually achieved through the use of a programmable timer circuit that periodically interrupts the main processor at precise times.

  Design a nine-step counter to count

Design a nine-step counter to count in the following sequence using D flip-flops (TTL 7474): 0011, 0101, 1001, 1000, 1011, 1010, 0110, 0100, 0111, 0011, include in the design a means for resetting the counter to 0011.

  Business intelligence and data warehouses

Business Intelligence and Data Warehouses

  Evaluating a new hands-free input device

You have been tasked with evaluating a new hands-free input device, the "chair mouse", which the user manipulates by shifting his/her weight in a specially instrumented chair.

  How the different tasks will play a part in future career.

How the different tasks will play a part in your current position or future career.

  Comparing accuracies using test options

Compare the accuracies obtained using the three "test options": "Use training set", "cross-validation" and "percentage split".

  Show how you would read the status of 100 students

Sample input and the results are shown below. Please enter 10 numbers: 10 31 2 73 24 65 6 87 18 9 Your numbers are: 10 9 31 18 2 87 73 6 24 65

  Calculate how much bob gets as his session

calculate Alice's session key. Is Bob's session key the same as Alice's session key? Why or why not?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd