/home/evankemp/NetBeansProjects/CS1/src/shapes/TheRoom.java |
1
2
3
4 package shapes;
5
6
7
8 @author
9
10 public class TheRoom {
11
12
13 @param args
14
15 public static void main(String[] args) {
16
17 int length = 21;
18 int width = 14;
19 int height = 9;
20
21
22 SRectangle face = new SRectangle(length,width);
23 double diagonalFace = face.diagonal();
24 SRectangle key = new SRectangle(diagonalFace,height);
25
26
27 double distance = key.diagonal();
28 System.out.println("Distance between one corner of a room "
29 + "to its far corner: " + distance);
30
31 }
32
33 }
34