// 9/6/2017 // This program introduces expressions // expression is built from variables, literals, // and operators. It always evaluates to a single value. /*** * / asterisk is times and forward slash is divide + - add and subtract ****/ public class expressions { public static void main(String[] args) { System.out.println( "This is the first line of my pgm." ); double taxes=0.0, rate=0.0; int hoursWorked=0; System.out.println("taxes: " + taxes); rate=17.1; hoursWorked=10; // value of an expression is printed by println System.out.println("pay is: " + rate*hoursWorked); double pay; // value of expression is assigned to a variable pay=rate*hoursWorked; System.out.println("pay is: " + pay); double oldRate; oldRate=rate; rate=20; } } /* * Lab2: Write a program that declares 1 variable of type double * to represent: today's temperature in degrees Faranheit * * A variable of type boolean to represent whether it is raining * today or not. * * An int to represent the class meeting. * * Print the following message: * Today is the nth class meeting, it is false raining, and the * temperature outside is q degrees faranheit. * /