/home/ssingh6/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 double roomHeight=9;
19 double roomWidth=14;
20 double roomLength=21;
21 SRectangle face= new SRectangle(roomWidth,roomLength);
22 SRectangle key = new SRectangle(roomHeight,face.diagonal());
23 double distance=key.diagonal();
24 System.out.println("The distance from one corner of a rectangular room to the far corner is "+ distance +"ft");
25
26 }
27
28 }
29