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