Write a java program that calculates the area of rectangular, square, triangular, and circle.
Your program must have the following: 1. Two classes named "Area" and "AreaTest". 2. Class "Area" has the following:
a. Void Square Method with one parameter which is length of side. b. Void Rectangle Method has two parameters which are width and height. c. Void Triangle Method has two parameters which are base and vertical height. d. Void Circle Method has one parameter which is radius. You must use Math.PI and Math.pow() function for your calculation. e. One Void Display Method to print out the calculation result for all methods (Square, Rectangle, Triangle, and Circle). For example, if I want to print the area of rectangle, you have to pass the result as a parameter to Display Method to print it out. There is one System.out.printf() in this method and must be as following format:
System.out.printf("The Area of %s is %s" ,str,result); str = any of these words: Square, Rectangle, Triangle ,or Circle.
Result = the result of the method calculation. f. Do not use Instance Variable for your program. 3. Class "AreaTest" has the following: a. Switch statement that maintains accessing each of the method in (a),(b), (c), and (d) stated above in class "Area" b. 'For statement loop' to keep the user running your program until he enters number '5' to exit the program