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

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

  Which approach do you favor and why

There are two primary approaches to measuring financial returns on IT investments: 1) Total Cost of Ownership (TCO) and 2) Return on Investment (ROI). Describe each of these approaches and analyze the advantages and disadvantages of each with a fo..

  Full-duplex trunk between end office-intermediate switch

In a simple telephone network comprising of two end offices and one intermediate switch with 1-MHZ full-duplex trunk between each end office and intermediate switch.

  Traditional approach or a type of agile approach

When evaluating a proposal for acquisition and sourcing, are there considerations that are unique in the case of an IT project versus a non-IT project?

  Write a mips program to complete the following functions

Write a MIPS program to complete the following functions. You must write comments and follow the register convention.

  Write a method called median

Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the middle if you arrange the elements in order

  The denominator for the target fraction

The denominator for the target fraction: 2 Enter the numerator for the next fraction to test: 2 Enter the denominator for the next fraction to test: 4 The fraction you just entered equals the first fraction of 1/2. Would you like to continue (Y/N)?

  What is ldap and what are its security vulnerabilities

Why do you think an organization would continue to use directory services that have known security flaws?

  Decide which of the following identifier forms

Decide which of the following identifier forms is most readable, and then support the decision. SumOfSales Sum_of_sales SUMOFSALES

  What are purpose active directory folders and limitatation

What are purpose of Active Directory folders (not share folder)

  Describe the components of the ethernet frame in detail

Describe the components of the Ethernet frame in detail

  Literature on corporate responsibility

Literature on corporate responsibility focuses on three areas of corporate responsibility: a company's relationship to its employees, to its particular industry, and to society in general.

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