Question: Write Java code for the following : An absract class called FourSides.The abstract class should contain the following abstract methods area(),perimeter(),getWidth(),getLength(),setWidth() and setLength(). Three classes
Write Java code for the following :
An absract class called FourSides.The abstract class should contain the following abstract methods area(),perimeter(),getWidth(),getLength(),setWidth() and setLength().
Three classes Rectangle and Square which inherit FourSides and aTestShape class which instatiates two objects of Rectangle and Square and calculates the area and peroimeter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
