Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In simple Java write a program that prompts the user to populate a collection of shapes which is sorted by it's area.The user needs to
In simple Java write a program that prompts the user to populate a collection of shapes which is sorted by it's area.The user needs to specify the shape and then enter the pertinent information to calculate the area of the shape.
Requirements: The types of shapes the user can enter are e Circle e Rectangle Triangle The structure of the program should follow this UML class diagram. ShapeCollection ShapeFrontEnd - shapes: Shapell + addShape(Shape): void -sortShapes(): void + removeShape(String,double): void + printShapes():void 1 + static main(Stringll args):void > Shape + getArea):double + toString(): String + getShapeType(): String Rectangle Triangle Circle length: double - width: double - base: double - height: double +getBase): double - radius: double +getRadius): double + setRadius(double): void +getLength(): double + setLength(double): voidsetBase(double): void +getWidth): double + setWidthldoublel: void +getHeight(): double + setHeightldoublel: voidStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started