Question: 1- shape class: -Fields: name, color. - Constructor: that receive parameters to give the fields their values. -toString method that print out the fields. 2-Towdimension
1- shape class: -Fields: name, color. - Constructor: that receive parameters to give the fields their values. -toString method that print out the fields. 2-Towdimension class: which is a subclass from shape class. -Fields: sides, angles. -Constructor: that receive parameters to call superclass constructor and give the fields their values. -tostring method that override the superclass method and print out the all fields
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
