Question: Please help solve this, by using JAVA! Show me the OUTPUT! Description In this assignment, you will create: an abstract class called Shape that implements

Please help solve this, by using JAVA! Show me the OUTPUT!
 Please help solve this, by using JAVA! Show me the OUTPUT!
Description In this assignment, you will create: an abstract class called Shape

Description In this assignment, you will create: an abstract class called Shape that implements Comparable . a class Rectangle that extends Shape a class Square that extends Rectangle a class ShapeList that extends ArrayList-Shape a class Main for testing your code (10 pts) Define an abstract class named Shape . Shape must implement Comparable Shape must include a method with signature: int compare To(Shape otherShape) Shape must have an abstract method with signature: double compute Area0 . The compare To method must compare the area of itself with the area of otherShape . Shape must have an abstract method with signature: String toString) (10 pts) Define a class named Rectangle . Rectangle must extend Shape . Rectangle must have: o a constructor with signature: Rectangle(double width, double height) o a computeArea method that returns the product of width and height o an equals method that checks if two Rectangles have the same width and height o a toString method that returns the width and height of the Rectangle as a String. For example, if width 10 and height 3, then it would return "(10, 3)

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!