Question: shape class implementation contains contains only compute area and other shapes implementation, so it doesnt matter Implement a class ShapeCollection to manage shape objects (copy-paste

 shape class implementation contains contains only compute area and other shapes

shape class implementation contains contains only compute area and other shapes implementation, so it doesnt matter

Implement a class ShapeCollection to manage shape objects (copy-paste the provided skeleton to finish the implementation); The class should have a static shape data structure, called shapes, to hold shape objects. The class should implement all the behaviors as in the skeleton code below. Skeleton code Class ShapeCollection { public ShapeCollection () { } public Iterator getShapes (){} public void addShape (Shape shape) { /* the method should insert a shape in shapes, * the method should double check that the input object * is not a duplicate +/ } public void removeShape (Shape shape) { } public void sortShapes () { /* sort shape objects by area using the natural ordering of elements* } public List searchShapes (double area) { } /* save and load shapes from the hard disk * using object serialization public void loadShapes (){} public void saveShapes () {} } Implement a class ShapeCollection to manage shape objects (copy-paste the provided skeleton to finish the implementation); The class should have a static shape data structure, called shapes, to hold shape objects. The class should implement all the behaviors as in the skeleton code below. Skeleton code Class ShapeCollection { public ShapeCollection () { } public Iterator getShapes (){} public void addShape (Shape shape) { /* the method should insert a shape in shapes, * the method should double check that the input object * is not a duplicate +/ } public void removeShape (Shape shape) { } public void sortShapes () { /* sort shape objects by area using the natural ordering of elements* } public List searchShapes (double area) { } /* save and load shapes from the hard disk * using object serialization public void loadShapes (){} public void saveShapes () {} }

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!