Question: use java Using your shape class o Add an abstract draw(Graphics g) method to your abstract Shape class Create a Rectangle, Ellipse, and Triangle class

 use java Using your shape class o Add an abstract draw(Graphicsg) method to your abstract Shape class Create a Rectangle, Ellipse, andTriangle class that are all extended from an abstract Shape class (given

use java

Using your shape class o Add an abstract draw(Graphics g) method to your abstract Shape class Create a Rectangle, Ellipse, and Triangle class that are all extended from an abstract Shape class (given below). Extend the Rectangle class to make a Square class. Extend the Ellipse class to make a Circle class. The shape classes will contain state information for the object to be drawn All the different shapes will need a draw method but each one will be slightly o o All extended classes should also implement a toString method- it is up to o All extended classes should also implement a equals method to compare two o The Circle, Ellipse, Triangle, Square, and Rectangle should have the same number different you how you want to represent the Shape as a String shapes of constructors with the same arguments, in addition to any other fields that are needed to create those shapes To initialize the private instance fields of the Shape class you will need to make calls to the super class constructor. Private fields and methods of a super class are not directly accessible in the subclasses as if you were in the same class Then initialize fields specific to the particular Shape class you are implementing

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 Databases Questions!