Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class main {
- /**
- * @param args
- */
- public static void main(String[] args) {
- // create some shape instances
- shape shapes[] = new shape[2];
- shapes[0] = new Rectangle(10, 20, 5, 6);
- shapes[1] = new Ellipse(30, 40, 12, 6);
- for (int i = 0; i < shapes.length; i++) {
- shapes[i].draw();
- shapes[i].shapeMoveTo(100, 100);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement