Question: In Java, I'm trying to write a program for the radius of the circle. I have the circle class mostly right. Just need help with

In Java, I'm trying to write a program for the radius of the circle. I have the circle class mostly right. Just need help with the main java class to run the following program.

In Java, I'm trying to write a program for the radius of Here's the code I've written so far:

the circle. I have the circle class mostly right. Just need help

radius of a circle. Your class will have the following internal field: . _radius-A float value that stores the radius of the circle It will also have the following public constant value declared and initialized properly. Make sure the value you declare is actually a constant and cannot be modified PI A float value initialized with the value 3.14159 Your class will have the following methods defined setRadius - Accepts a float for the radius fielod . getRadius - Returns the radius of the circle as a float. getDiameter - Returns the diameter of the circle as a float (radius 2) getArea - Returns the area of the circle (PI * radius radius) getCircumference - Returns the circumference of the circle (2 PI* radius) In addition, you will create a constructor that takes the radius (as a float) and stores the value in the_radius field. Your Circle class MUST have proper JavaDoc documentation for all public (external) methods, constructors and a summary of the class You will then write an application that prompts the user for the size of the circle and then output the radius, diameter, area and circumference of the specified circle. Your output should look like the following: Enter the radius of the circle: 12.2 Circle Properties Radius: Diameter: Area: Circumference: 76.7 12.2 24.4 467.6 Pay attention to the formatting of the output. For full credit, the output / formatting must be identical. Make sure that your sizes line up for easy reading. Decimals are expected to be output to one decimal place

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!