Welcome again
I am afraid I don't understand the design of the app. You have got an abstract class and made it implement Comparable. That doesn't look quite right. Read
this, which tells you that Comparable represents a total ordering and a natural order. That means that for every pair of instances of that class, you can hold your hand on your heart and say one of the following things:-
1: Object 1 is greater than object 2.2: Object 1 is less than object 2.3: Object 1 is the same as object 3.I am not convinced you can do that with shapes. If you have a circle diameter 10, is it larger or smaller than a square with a diagonal 10? Does a circle have height and width? Does a circle have a diagonal?
By the way, there is a method in the
Math class which calculates diagonals for you without your having to do all the arithmetic yourself.