1 /* 2 * This program affords opportunities to explore the construction of arithmetic expressions in the context of some very good simple problem solving 3 */ 4 5 package expressions; 6 7 public class ExpressionsThing { 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 //expression one is incorrect. expression three is fully parenthized 16 int four = (2*3); 17 System.out.println("four= "+ four); 18 double five = (.5*55); 19 System.out.println("five= " + five); 20 double six = (65/3); 21 System.out.println("six = " + six); 22 double seven = (five+six); 23 System.out.println("seven = " + seven); 24 double eight = (3.14*(11.3*11.3)); 25 System.out.println("eight = " + eight); 26 double nine = (27.7*27.7); 27 System.out.println("nine = " + nine); 28 double ten = ((eight+nine)/2); 29 System.out.println("ten = " + ten); 30 double eleven = (243.5*0.17); 31 System.out.println("eleven = " + eleven); 32 int twelve = (3/3); 33 System.out.println("twelve = " + twelve); 34 int thirteen = ((4*2)-7); 35 System.out.println("thirteen = " + thirteen); 36 int forteen = ((3-1)+(9-7)); 37 System.out.println("forteen = " + forteen); 38 int fifteen = ((4+6)/(8/(2*2))); 39 System.out.println("fifteen = " + fifteen); 40 } 41 } 42