ExpressionsThing.java
1    /* 
2    3        This program introduces the concepts of the construction  
3    4        of arithmetic expressions  
4    5     */
5    package expressions;
6    
7    import shapes.SCircle;
8    import shapes.SSquare;
9    
10   public class ExpressionsThing {
11   
12       public static void main(String[] args) {
13           //One
14           double one = 3.14 * 5 + 5;
15           System.out.println("one = " + one);
16           //Two
17           double two = 3.14 * (5 + 5);
18           System.out.println("two = " + two);
19           //Three
20           double three = (3.14 * (5 + 5));
21           System.out.println("three = " + three);
22           //Four
23           int four = (2 * 3);
24           System.out.println("four = " + four);
25           //Five
26           double five = ((1.0 / 2) * 55);
27           System.out.println("five = " + five);
28           //Six
29           double six = ((1.0 / 3 * 65));
30           System.out.println("six = " + six);
31           //Seven
32           double seven = (((1.0 / 2) * 55) + ((1.0 / 3) * 65));
33           System.out.println("seven = " + seven);
34           //Start of task 5 (eight)
35           double eight = 3.14 * (11.3 * 11.3);
36           System.out.println("eight = " + eight);
37           //Nine
38           double nine = (27.7 * 27.7);
39           System.out.println("nine = " + nine);
40           //Ten
41           double ten = (3.14 * 127.69 + (27.7 * 27.7));
42           System.out.println("ten = " + ten);
43           //Eleven
44           double eleven = ((17 * 243.5) / 100);
45           System.out.println("eleven = " + eleven);
46           //Twelve
47           int twelve = (3 / 3);
48           System.out.println("twelve = " + twelve);
49           //Thirteen
50           int thirteen = ((7 - 2) - 4);
51           System.out.println("thirteen = " + thirteen);
52           //Fourteen
53           int fourteen = ((9 + 7) / (3 + 1));
54           System.out.println("fourteen = " + fourteen);
55           //Fifteen
56           int fifteen = (((4 * 2 / 8) + 6) - 2);
57           System.out.println("fifteen =  " + fifteen);
58       }
59   }
60