ExpressionsThing.java
1    /* 
2     *using simple math functions to practice parenthesized expressions and introduce abstraction 
3     */
4    package expressions;
5    
6    public class ExpressionsThing {
7    
8        public static void main(String[] args) {
9            double one = 3.14 * 5 + 5;
10           System.out.println("one = " + one);
11           double two = 3.14 * (5 + 5);
12           System.out.println("two = " + two);
13           double three = (3.14 * (5 + 5));
14           System.out.println("three = " + three);
15           int four = (2 * 3);
16           System.out.println("four = " + four);
17           double five = (55.0/2.0);
18           System.out.println("five = " + five);
19           double six = (65.0/3.0);
20           System.out.println("six = " + six);
21           double seven = ((55.0/2.0) + (65.0/3));
22           System.out.println("seven = " + seven);
23           double PI = 3.14;
24           double R = 11.3;
25           double eight = (PI * (R * R));
26           System.out.println("eight = " + eight);
27           double S = 27.7;
28           double nine = (S * S);
29           System.out.println("nine = " + nine);
30           double ten = ((nine + eight)/2);
31           System.out.println("ten = " + ten);
32           double eleven = (243.5 * 0.17);
33           System.out.println("eleven = " + eleven);
34           int twelve = (3/3);
35           System.out.println("twelve = " + twelve);
36           int thirteen = ((7-4)-2);
37           System.out.println("thirteen = " + thirteen);
38           int fourteen = ((9-7)+(3-1));
39           System.out.println("fourteen = " + fourteen);
40           int fifteen = ((8-(2*2))+((6-4)/2));
41           System.out.println("fifteen = " + fifteen);
42       }
43   
44   }
45