Source of ShapeDemo.java


  1: //ShapeDemo.java
  2: 
  3: public class ShapeDemo
  4: {
  5:     public static void main(String[] args)
  6:     {
  7:         RectangleInterface box = new Rectangle(5, 8, 4);
  8:                 box.drawHere();
  9:                 
 10:                 box.set(5, 5);
 11:                 box.setOffset(10);
 12:                 box.drawAt(2);
 13: 
 14:         //Note that the following is illegal:
 15:         //ShapeBase sb = new ShapeBase();
 16:     }
 17: }
 18: