CS1 Standard Demo Page

The following text was written to the standard output stream when the TheRoom.java program was executed from Netbeans.

/*
 * Program to find the diagonal of a curtain inside of a room.
 */
package shapes;

/**
 *
 * @author ecuevas
 */
public class TheRoom {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    //VARIABLES
    double roomHeight = 9;
    double roomWidth = 14;
    double roomLength = 21;
    double faceLength = 21;
    
    // SHAPES 
    SRectangle face = new SRectangle(roomWidth,roomLength);
    System.out.println("sides of rectangle = " + face.toString());
    System.out.println("diagonal of rectangle = " + face.diagonal());
    double keyLength = face.diagonal();

    SRectangle square2 = new SRectangle(face.diagonal(),roomHeight);
    System.out.println("curtain dimensions = " + square2.toString());
    System.out.println("diagonal of curtain = " + square2.diagonal());
    }
    
}