Question: Part I: Code a Circle class with all necessary constructor and methods that will accept the radius as data entry and compute the perimeter

Part I: Code a Circle class with all necessary constructor and methods that will accept the radius as data entry and compute the perimeter and area of the circle respectively using two different methods called compoutePerimeter and computeArea. You must verify invalid data entries for radius (No letters and must be a positive real number) using exception handling. And code also a custom-designed exception class named NegativeDoubleException to handle the negative data exception. You will use methods of JOptionPane to accept data entry, display the error messages and output results including radius, perimeter, and the area. In the exception handling, you must use loop to allow user to reenter a radius if it is invalid until a correct data is entered. Code CircleValidationApp as the driver class. Run and test your code to meet the requirements. Your validation code will continue to run until the valid data is entered. You can code the validation processing in either driver class or in the Circle class. Must use meaningful names for fields, variables, methods and classes. Part I: Code a Circle class with all necessary constructor and methods that will accept the radius as data entry and compute the perimeter and area of the circle respectively using two different methods called compoutePerimeter and computeArea. You must verify invalid data entries for radius (No letters and must be a positive real number) using exception handling. And code also a custom-designed exception class named NegativeDoubleException to handle the negative data exception. You will use methods of JOptionPane to accept data entry, display the error messages and output results including radius, perimeter, and the area. In the exception handling, you must use loop to allow user to reenter a radius if it is invalid until a correct data is entered. Code CircleValidationApp as the driver class. Run and test your code to meet the requirements. Your validation code will continue to run until the valid data is entered. You can code the validation processing in either driver class or in the Circle class. Must use meaningful names for fields, variables, methods and classes.
Step by Step Solution
There are 3 Steps involved in it
Here is the implementation of the Circle class with the required methods and exception handling import javaxswingJOptionPane Custom exception class fo... View full answer
Get step-by-step solutions from verified subject matter experts
