/home/kchan2/NetBeansProjects/CS1/src/shapes/TheRoom.java
 1 /*
 2  * A program that computes the distance from one corner of a rectangular 
 3  * room to its far corner.
 4  */
 5 package shapes;
 6 
 7 /**
 8  *
 9  * @author kchan2
10  */
11 public class TheRoom {
12 
13     /**
14      * @param args the command line arguments
15      */
16     public static void main(String[] args) {
17        double roomHeight = 9;
18        double roomWidth = 14;
19        double roomLength = 21;
20        SRectangle face = new SRectangle(roomWidth,roomLength);
21        SRectangle key = new SRectangle(roomHeight,face.diagonal());
22        double distance = key.diagonal();
23        System.out.println
24         ("The distance from one corner of a rectangular room to its "
25                 + "far corner = " + distance + " ft");
26     }
27     
28 }
29