The circletest class will have a main method


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

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

Limit your output to three digits after the decimal point by using the String.format method. Add exception handling to your program so that, if the user inputs something other than a string of digits, your program catches the exception and gives the user another chance to input the value of the radius.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: The circletest class will have a main method
Reference No:- TGS0123589

Expected delivery within 24 Hours