/** * Author: Josiah Yoder et al. * Class: SE1011-011 * Date: 12/10/13 11:13 AM * Lesson: Week 7, Day 1 */ package example2_1; import java.util.ArrayList; public class DrawableDrive { public static void main(String[] args) { Drawable drawable = new Circle(1.0,1.0,2.0); ArrayList things = new ArrayList(); // Anything derived from Drawable is a Drawable things.add(new Circle(0,0,5)); things.add(new Shape()); System.out.println("drawable: "+drawable); // same thing: // System.out.println("drawable: "+drawable.toString()); } }