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 lab5.
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(0.5) reduces the radius of the Circle by
50%, if it is a Square, the side value is reduced. In the other hand, resize(2)
doubles the dimensions of the shape.
Circle Area : ?PI**R2, Perimeter: 2**PI **R
Square Area: side*side, Perimeter: 4** side public static void main(String[] args){
Circle c= new Circle(5);
System.out.println(c);
Square s = new Square(10);
System.out.println(s);
s.resize(0.5);
c.resize(2.0);
System.out.println(s);
System.out.println(c);
}
Circle - Area: 78.54- Perimeter: 31.41
Square - Area: 100.0- Perimeter: 40.0
Square - Area: 25.0- Perimeter: 20.0
Circle - Area: 314.15- Perimeter: 62.83
Create a java project named lab 5 . Create all

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!