Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

This Lab Is Meant To Solidify Your Knowledge Of Abstract Classes And Interfaces. The Goal Of This Lab Is For You To Be Given A

This Lab Is Meant To Solidify Your Knowledge Of Abstract Classes And Interfaces. The Goal Of This Lab Is For You To Be Given A UML Diagram That Describes The Relationships Between Shape Classes: Implement Each Class, Including The Specified Instance Variables And Methods Implement Testing Procedures (Driver Class) For The Classes Introduction . Few Important

Comparable Shape -numshapes -id: int +Shapel) +getNumShapes():int +geld()int + compare To Shape s)int +toString():String +getArea().double +getPerimetery),double +getShape Type:String D Circle -radius: double +Circle(radius:double) +getAreal).double +getPerimeter).double +getShapeType():String All Getters Quadrilateral -height:double -width:double + Quadrilateral(height:double width: double) All Getters Triangle -height:double -base Width:double -side 1 Length:double -side2Length:double + Triangle height double base Width: double. sidel Length:double side2Length:double) +getAreal):double +getPerimeter().double +getShapeType(): String All Getters Rectangle + Rectangle(height:double.width:double) +getArea():double +getPerimeter().double +getshapeType(): String Square +Square(size:double) + getShapeType():Strin

Create each class in the UML diagram Include all methods and instance variables, with the specified visibility Watch spelling and casing o o Implement attributes and methods o Classes are dependent on each other, so you can have temporary errors while you implement To complete the lab, use the following test class ShapeComparator and make sure it all works in your driver class: Comparator ShapeComparator +compare(s1:Shape, s2:Shape):int +equals(1:Shape, s2:Shape): boolean Rubric and Submission Item Create each class in the UML diagram Implement attributes and methods Create ShapeComparator class and implement compare and equals methods Driver class with main routine has been completed and properly tests shapes The program compiles, and works as intended Proper commenting, indentation, and variable names Total Points 15 20 20 20 20 5 100 Upload all the .java files to Canvas. Do NOT ZIP.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Programming questions