create a superclass Shape with 2 attributes X, Y with a constructor, getters, setters, toString, and 2
Fantastic news! We've Found the answer you've been seeking!
Question:
create a superclass Shape with 2 attributes X, Y
with a constructor, getters, setters, toString, and 2 abstract methods one is an area, and one is the circumference
And create 3 subclasses: Square, Rectangle, and Circle
Put the suitable attributes for each class and let each one complete the abstract methods
In the main create an array list of the shapes to contain details about all different shapes.
allow the user to enter the value X for the shapes then print all details of a shape that has its value x equal to the entered value, and for each of them tell if its a square, rectangle, or circle and print its area.
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date: