Question: Java programming please (2) (4 points)Define an interface MyComparable which contains one method named compare To(Shape shape). The compare To() method returns I, when the
(2) (4 points)Define an interface MyComparable which contains one method named compare To(Shape shape). The compare To() method returns I, when the property/properties of the current shape(it is a casting object) is/are greater than that of the shape. Otherwise it returns 0 if they are equal, or returns -1, if it is less than the shape's
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
