import java.util.ArrayList;


public class DemoShape {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Square s = new Square(2,60,10.0);
		
		System.out.println(s.area());
	    Circle c = new Circle();
	    c.radius = 1.0;
		System.out.println(c.area());
		
		
		ArrayList<Shape> shapes = new ArrayList<Shape>();
		
		shapes.add(s);
		shapes.add(c);
		
		double area = 0.0;
		for (Shape shape : shapes) {
			area += ((Shape) shape).area();
			System.out.println(shape.show());
			
		}
		
		
		
		System.out.println(area);
		
		
		

	}

}

