/home/cdesrivi/NetBeansProjects/CS1/src/shapes/BlackArea.java |
1
2
3
4
5
6 package shapes;
7
8
9
10
11 @author
12
13 public class BlackArea {
14
15
16 @param args
17
18 public static void main(String[] args) {
19 double deckLength = 2.25;
20 double deckheight = 3.5;
21 SRectangle deckred = new SRectangle(deckLength,deckheight);
22 SRectangle deckblue = new SRectangle(deckLength, deckheight);
23 double glass = 2.1;
24 SSquare glass1 = new SSquare(glass);
25 double table = 39;
26 SSquare table1 = new SSquare(table);
27 System.out.println("table1 = " + table1.toString());
28 System.out.println("area of table1 = " + table1.area());
29 SCircle coaster = glass1.circumscribingCircle();
30 double areaOfObjects = (2*deckred.area()) + (4*glass1.area());
31 double tablespace = (table1.area() - areaOfObjects);
32 System.out.println("Remaining area" + tablespace);
33
34
35 }
36
37 private static class square {
38
39
40 }
41
42
43
44 }
45
46
47
48
49
50
51
52
53