Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program 1: Write a Java application to calculate thecircumference and the area o

ID: 3613762 • Letter: P

Question

Program 1: Write a Java application to calculate thecircumference and the area of a circle. Your application must havetwo classes. The Circle class will have two methods: thecircumference method and the area method. Each method will take adouble input parameter as the value of the radius, perform itscalculation, and return a double result.

TheCircleTest class will have a main method that uses aJOptionPane to get the value of the radius fromthe user. The main method will create an object of the Circle classand test its methods. The main method will also use aJOptionPane for output. Use Math.PI and theMath.pow method in your calculations.

Limit your output to three digits after thedecimal point by using the String.formatmethod. Add exception handling to your program so that, if the userinputs something other than a string of digits, your programcatches the exception and gives the user another chance to inputthe value of the radius.


This is what I here so far. I figure out the circumference andarea but I can't seem to construct the rest of the program. Ineed some help to determine what the rest of the source codes areand how it would follow through. Can someone please help meon this problem?


Explanation / Answer

public

{

{

diameter = 2*radius;

circumference = Math.

}

{

radius = Math.pow(radius, 2);

area = Math.

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote