Question: Using Java (eclipse) create a superclass or parent class called Shape. This shape class will have just one method to setBorderColor. Now we need 3
Using Java (eclipse) create a superclass or parent class called Shape. This shape class will have just one method to setBorderColor.
Now we need 3 subclasses that extend the Shape class, Circle, Square and Rectangle. In these classes we will need to compute the area of each of the shapes and print it to the console using System.out.println
You will need to take in an additional parameter in each of these subclasses -- side for Square, length and breadth for rectangle and radius for the circle.
Finally create a new class called App. You will need to have a main method in this App class that will construct the different shapes and call the computeArea method of each of the shapes to print out the area and call the getBorderColor to print out the border color of each shape.
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
