31.5k views
0 votes
shapes polymorphism Create a set of classes derived from an abstract class Shape, which provides a common interface, for managing various 2D geometric shapes. In our model, each Java object will represent a shape somewhere in a Cartesian coordinate system. However, note that unlike in Mathematics, the positive y-axis grows down from the origin.All shapes have a color, of type String, and coordinates defined by integers. Individual shapes are mutable and have appropriate accessors and mutators for its unique data. See below for abstract functions declared in the base class.

1 Answer

5 votes

Answer:

Step-by-step explanation:

demo.java Shapes 2 Shapes Polymorphism Create a set of classes derived from an abstract class Shape, which provides a common interface, for managing various 2D geometric shapes. In our model, each Java object will represent a shape somewhere in a Cartesian coordinate system. However, note that unlike in Mathematics, the positive y-axis grows down from the origin. Shapes All shapes have the following properties: color, area, perimeter, location, and bounds. Shapes are mutable, for example any shape can be moved.

User ObjSal
by
4.3k points