/********************************************************************* * Author: Eric Heim * Date Created: 7/7/2011 * Course: CS0007 * Description: Shows the use of an instance of the rectangle class *********************************************************************/ public class NoArgConstructorDemo { public static void main(String[] args) { Rectangle rec1 = new Rectangle(); Rectangle3 rec2 = new Rectangle3(); System.out.println("Default Constructor"); System.out.println(rec1.getLength()); System.out.println(rec1.getWidth()); System.out.println(rec1.getPerimeter()); System.out.println(rec1.getArea() + "\n"); System.out.println("No-Arg Constructor"); System.out.println(rec2.getLength()); System.out.println(rec2.getWidth()); System.out.println(rec2.getPerimeter()); System.out.println(rec2.getArea()); } }