This Is The Class Diagram For The Project There Are Three Cl

This Is The Class Diagram For The Projectthere Are Three Classes For

This is the class diagram for the project: There are three classes for the project, and two inner classes defined in the Cuboid class. Create the following classes: · Shape. It’s an abstract class with two abstract methods, area and perimeter. Total 5 points · Rectangle. It’s a concrete class that extends Shape. Implement area() and perimeter()… you can figure out the implementation for these methods. Implement the compareTo(object) method to sort rectangles by area in ascending order. Total 5 points · Cuboid. It’s a concrete class that extends Rectangle. A cuboid is a 3D rectangle. The shape has a third dimension, Depth. Override the area() method to compute the surface area of the object and implement new method volume(). The perimeter method is invalid in this context. The best way to handle this is to throw an exception called “UnsupportedOperationExceptionâ€. If perimeter() is called, throw this exception. Total 10 points · SortByArea and SortByVolume are two classes defined as attributes of the Cuboid class. If you want to sort, the easiest way is to implement the compareto() method. If you want to sort more than one way, you must implement multiple comparators. Implement these methods so they are sorting by area in ascending order and volume in ascending order. Total 10 points Here’s an example of how to implement comparators: Complete the following unit tests: · Rectangle. Total 15 points · Test Construction · Test getter / setter methods · Test area() · Test perimeter · Test compareTo(Object), ensuring rectangles are being sorted correctly (2x2 sorts