Advertisement
calcpage

APCS2012_C2X3_FourTrianglePrinter.java

Sep 20th, 2012
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.34 KB | None | 0 0
  1. import java.awt.Rectangle;
  2. public class FourRectanglePrinter
  3. {
  4.     public static void main(String[] args)
  5.     {
  6.         Rectangle box = new Rectangle(10,20,30,50);
  7.         System.out.println(box);
  8.         box.translate(30,0);
  9.         System.out.println(box);
  10.         box.translate(0,50);
  11.         System.out.println(box);
  12.         box.translate(-30,0);
  13.         System.out.println(box);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement