CMIS 345 Week 5 Using either the Week 3 GeometricObject heirarchy classes or your improved Week4 classes write a program that makes an ArrayList of GeometricObjects. Randomly (flip of coin) add Circles and Rectangles to it. Ask the user how many objects to create. Iterate or loop over the elements of the ArrayList using a GeometricObject reference variable to point to each arraylist element. Notice that it can only access GeometricObject members such as (implicit) toString, and the getters and setters of GeometricObject data members color, filled, and dateCreated. To access the Circle or Rectangle object members a cast to that class is needed. page 344-345 An ArrayList stores Objects (objects of the Object class that is the superclass of all Java classes). To be used polymorphically to store objects of your class heirarchy you have to cast the 'getted' object to the top of your heirarchy: GeometricObject geom; ... geom = (GeometricObject)(geometricsArrayList.get(i)); Now geom can access the methods of an GeometricObject object: color = geom.getColor(); System.out.print(geom ); //implicit toString() but not the additional methods of Circle or Rectangle: geom.getArea() //syntax error: "cannot find symbol symbol : method getArea()" without a downcast to the subclass, first making sure the object is of that class: if (geom instanceof circle) ...((Circle)geom).getArea()...