(String[] args)
| 17 | name, x, y); |
| 18 | } |
| 19 | public static void main(String[] args) { |
| 20 | PrintStream outAlias = System.out; |
| 21 | Turtle tommy = new Turtle("Tommy", |
| 22 | new Formatter(System.out)); |
| 23 | Turtle terry = new Turtle("Terry", |
| 24 | new Formatter(outAlias)); |
| 25 | tommy.move(0,0); |
| 26 | terry.move(4,8); |
| 27 | tommy.move(3,4); |
| 28 | terry.move(2,5); |
| 29 | tommy.move(3,3); |
| 30 | terry.move(3,3); |
| 31 | } |
| 32 | } |
| 33 | /* Output: |
| 34 | Tommy The Turtle is at (0,0) |