Question: Create a new Java class for each object class described in the UML diagram. Implement the attributes and methods for each class. Create and run

Create a new Java class for each object class described in the UML diagram.
Implement the attributes and methods for each class.
Create and run a tester to test all methods.
Comparable Interface Comparator interface ShapeComparator compare($1:Shape, $2:Shape):int |.equals(s 1:Shape, s2:Shape):boolean Shape -numShapes -id: int +Shape() getNumShapes():int *getid():int compare To Shape s):int +toString():String *getArea().double getPerimeter().double *getShape Type():String Circle -radius:double Circle(radius:double) +getArea():double *getPerimeter():double +getShape Type(): String All Getters Quadrilateral -height:double -width:double +Quadrilateral(height:double, width:double) All Getters Triangle -height:double -baseWidth:double -side 1 Length:double -side2Length:double +Triangle(height:double, baseWidth:double, side 1 Length:double side2Length:double) +getArea():double +getPerimeter():double +getShape Type():String All Getters Rectangle +Rectangle(height:double,width:double) *getArea():double .getPerimeter():double *getShape Type():String Square +Square(size:double) *getShape Type():String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
