import java.awt.Rectangle; /** * Write a description of class TestProgram here. * * @author John Paxton * @version September 10, 2008 */ public class TestProgram { public static void main (String [] args) { Rectangle table; Rectangle paper; table = new Rectangle (5, 3, 3, 2); // call the constructor paper = new Rectangle (0, 0, 8, 11); // getWidth is an example of an accessor method System.out.println("The width of the table is " + table.getWidth()); System.out.println("The width of the paper is " + paper.getWidth()); // translate is an example of a mutator method paper.translate(10, 20); System.out.println("The new X value of paper is " + paper.getX()); } }