/*
 * File: RectangleUser.java
 *  CIS73 - Bristol Community College
 *  Description: This class serves as a user interface for the
 *  Rectangle class. It creates two Rectangle objects and 
 *  asks them to display their dimensions and calculate their
 *  respective areas. Note that it tests every attribute and method
 *  of the Rectangle class.
 */

public class RectangleUser
{
    public static void main(String args[])
    {
        Rectangle rectangle1 = new Rectangle(30, 10);
        Rectangle rectangle2 = new Rectangle(25, 20);

        System.out.println("*************************************");

        System.out.println("rectangle1 length " +
                            rectangle1.getLength());

        System.out.println("rectangle1 width  " +
                            rectangle1.getWidth());

        System.out.println("rectangle1 area " +
                            rectangle1.calculateArea());

        System.out.println("\nDimensions for Rectangle1");

        rectangle1.displayRectangle();

        System.out.println("*************************************");

        System.out.println("rectangle2 length " +
                            rectangle2.getLength());

        System.out.println("rectangle2 width  " +
                            rectangle2.getWidth());

        System.out.println("rectangle2 area " +
                            rectangle2.calculateArea());

        System.out.println("\nDimensions for Rectangle2");

        rectangle2.displayRectangle();

        System.out.println("*************************************");

        rectangle2.setLength(50);

        rectangle2.setWidth(40);

        System.out.println("\n New Dimensions for Rectangle2");

        rectangle2.displayRectangle();

        System.out.println("*************************************");


    } // main()

} // End RectangleUser

/*
 *************************************
rectangle1 length 30.0
rectangle1 width  10.0
rectangle1 area 300.0

Dimensions for Rectangle1
Rectangle Length = 30.0
Rectangle Width = 10.0
*************************************
rectangle2 length 25.0
rectangle2 width  20.0
rectangle2 area 500.0

Dimensions for Rectangle2
Rectangle Length = 25.0
Rectangle Width = 20.0
*************************************

 New Dimensions for Rectangle2
Rectangle Length = 50.0
Rectangle Width = 40.0
*************************************
Press any key to continue...
*/



