SHARE
TWEET

APCS2012_C2X3_FourTrianglePrinter.java

calcpage Sep 20th, 2012 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top