I need a program that will ask the user for an object (circle or rectangle) and calculate its circumference or perimeter and its area. I will need you to use a driver class, a class called Circle and one called Rectangle. The program will ask the user for an object and expect the user to type in "Rectangle" or "Circle" and then make a decision based on the input. I will require the program to use an "if" statement to make the decision about which shape was entered. Depending on the shape entered, the program should ask for the following input and then call on the appropriate methods for the object that was selected.
1 Circle - radius
2 Rectangle - width and height
Notice that this information is not sufficient to tell where the object is located if we were in an environment where it was necessary to know the actual points for the center or the corners of the rectangle.
In the output the program should display
1 The shape that was selected
2 The original input values for the shape
3 The calculated values for perimeter (circumference) and area
Example:
The shape you entered was a circle.
The area of a circle with radius 5 is 78.5
The circumference of a circle with radius 5 is 31.4
REQUIREMENTS
1. I need three separate files for this program (1) a main driver class called ShapeCalculator, (2) a Circle class and (3) a rectangle class
2. I also need UML diagrams and their relationship for all objects and Pseudocode for the driver (main class) and for one method from each shape class
I can create simple, concise, and clear Java code to calculate areas and perimeters of rectangles for you. I will also supply the pseudocode and UML diagrams you need. Everything will be done to your complete satisfaction.