package expressions; public class ExpressionsThing { //Lab 4 allows for the exploring the construction of arithmetic expressions in terms of simple problem solving public static void main(String[] args) { //Three related expressions double one = 3.14 * 5 + 5; //does not follow order of operations without parentheses = 20.7// System.out.println("one = " + one); double two = 3.14 * (5 + 5); System.out.println("two = " + two); double three = (3.14 * (5 + 5)); // fully parenthesized expression System.out.println("three = " + three); //Translating fully parenthesized arithmetic expressions from English int four = (2 * 3); System.out.println("four = " + four); double five = (55.0 / 2.0); System.out.println("five = " + five); double six = (65.0 / 3); System.out.println("six = " + six); double seven = ((55.0 / 2.0) + (65.0 / 3)); System.out.println("seven = " + seven); //Computations based on simple geometric/ algebraic conceptions double eight = (3.14 * (11.3 * 11.3)); System.out.println("eight = " + eight); double nine = (27.7 * 27.7); System.out.println("nine = " + nine); double ten = (((3.14 * (11.3 * 11.3)) + (27.7 * 27.7)) / 2.0); System.out.println("ten = " + ten); double eleven = (243.5 * .17); System.out.println("eleven = " + eleven); //Simple Computations to solve Crypto problems int twelve = (3 / 3); System.out.println("twelve = " + twelve); int thirteen = (7 - (4 + 2)); System.out.println("thirteen = " + thirteen); int fourteen = ((9 + 3) - (7 + 1)); System.out.println("fourteen = " + fourteen); int fifteen = (((6 / 2) + 8) - (4 + 2)); System.out.println("fifteen = " + fifteen); } }