public class TestGeometricObject
{
//change the following to true to watch the order of constructor invocation
public static void main (String [] args)
{
GeometricObject g1, g2;
g1 = new Circle(2);
g2 = new Rectangle(2,4);
System.out.println(g1.toString());
System.out.println(g2.toString());
//these work with the new GeometricObject but not with the old one
System.out.println(g1.getArea());
System.out.println(g2.getArea());
System.exit(0);
}
}