Question: Create a java project named lab 5 . Create all the classes, abstract classes, interfaces shown in the given class diagram. Do NOT add any
Create a java project named lab
Create all the classes, abstract classes, interfaces shown in the given class
diagram.
Do NOT add any methods or attributes other than the ones shown in the diagram.
Implement the required methods in both Circle and Square classes.
Download the Tester App from Blackboard. Add it to your project. Pay special
attention to the output.
Notes:
Shape is an abstract class.
Resize method reduces or enlarges all the dimensions of the shape by the
percentage. For example, resize reduces the radius of the Circle by
if it is a Square, the side value is reduced. In the other hand, resize
doubles the dimensions of the shape.
Circle Area : Perimeter: I
Square Area: sideside Perimeter: side public static void mainString args
Circle c new Circle;
System.out.printlnc;
Square s new Square;
System.out.printlns;
sresize;
cresize;
System.out.printlns;
System.out.printlnc;
Circle Area: Perimeter:
Square Area: Perimeter:
Square Area: Perimeter:
Circle Area: Perimeter:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
