Question: Objective: Write a program where a user populates a collection of various shapes, which is sorted by its area. The user should be able to

 Objective: Write a program where a user populates a collection of
various shapes, which is sorted by its area. The user should be

Objective: Write a program where a user populates a collection of various shapes, which is sorted by its area. The user should be able to specify which type of shape they wish to enter, and then are prompted with the pertinent information which will be used to calculate the shape's area. Requirements The types of shapes the user can enter are: Circle Rectangle Triangle The structure of the program should follow this UML class diagram. ShapeCollection Shape FrontEnd shapes: Shape0 addShape(Shape) void sortShapes0: void static main Stringl argsivoid removeShape(String double): void print Shapes0:void > +get Area 0:double +toString(): String +getShapeType0 String Rectangle Triangle length: double base: double width double -height: double +getRadius0: double +getLength(): double getBase0: double setRadiusIdouble) void setlength double): void setBase(double): void getHeight0: double +getWidth 0: double setWidth (double): void setHeight(double): void You may also include helper methods that are not noted in the class diagram, but its overall class structure should be what is shown above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!