/*
 * Tracing Code
 * 
 * For each group of statements below, fill out the table at the end of the file with
 * the values of x and y AFTER the statements execute and a short description of what
 * the statements do. 
 * 
 * Try to fill out the table without running the program. After that, add output 
 * statements to check your work. You can just copy and paste the output line after #1.
 * 
 * Statement #1 is done for you.
 */

public class TracingCode {

	public static void main(String[] args) {
		// #1
		int x = 42;  
		int y = 10;
		System.out.println("#1 x = " + x + "\t y = " + y);
		
		// #2
		x = x + 1;  
		y = y + 2;
		
		// #3
		x++; 
		y--;
		
		// #4
		++x;
		--y;
		
		// #5
		y = x / y;
		
		// #6
		y += 1;
		x += y + 2;  
		
		// #7
		x *= 2; 
		
		// #8
		x = x % y;
		y = y % 3;
		
		// #9
		x = y++;   // Be careful with this kind of thing. See note below.
		
		// #10
		x = ++y;   // Be careful with this kind of thing. See note below.
		
		// #11
		x = Integer.MAX_VALUE;
		
		// #12
		x = x + 1;

		
		/*
		 * Fill out the table below with your answers.
		 * Statement		x			y		Description
		 * #1				42			10		x is initialized to 42
		 * #2
		 * #3
		 * #4
		 * #5
		 * #6
		 * #7
		 * #8
		 * #9
		 * #10
		 * #11
		 * #12
		 */
		

		//NOTICE: prefix and postfix operators
		//prefix ++ operator: increments x and evaluates to the new value of x
		//postfix ++ operator: increments x but evaluates to the old value of x
		//do NOT put a ++ or -- operator in a place where the order matters
		
	}

}
