public class TestRectangle { public static void main(String [] args) { Rectangle r1, r2; int width; r1 = new Rectangle(3, 5); r1.print(); System.out.println("r1: area="+r1.computeArea()); System.out.println("r1: perimeter="+r1.computePerimeter()); r1.setWidth(9); r1.print(); r2 = new Rectangle(); r2.print(); width = r1.getWidth(); r2.setWidth(width); r2.setLength(3); r2.print(); r2.printAll(); } }