Question: java programming please (3) (6 points)Define a class named Rectangle which inherits from Shape and implements MyComparable. a) Declare two instance variables width and height.
(3) (6 points)Define a class named Rectangle which inherits from Shape and implements MyComparable. a) Declare two instance variables width and height. b) Overload the corresponding constructors. c) Override all of methods which inherit from Shape. d) Override the method compareTo() which compares the areas of the two rectangles
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
