CS 111 - 10/16/12 Still grading the exams. Hopefully back by Tuesday. Combining two pictures into 1 Blend two pictures together on the left side: 100% picture1, 0% picture2 on the right side: 0% picture1, 100% picture2 =============================================== Selection Statement if statement These statements allow us to select whether or not to execute a sequence of statements Syntax: if ( ) { ; } if the is true, then the is executed. if the is false, the is NOT executed. Example: absolute value int number; if ( number < 0 ) { number = 0 - number; } The use of the simple if-then statement, can be used to verify input from the user. Assume we want a value to be less than 100, if not we print an error message and quit the program int number; number = SimpleInput.getIntNumber ("Enter a value " + " less than 100"); if ( number >= 100 ) { SimpleOutput.showInformation ("Error: value is " + " not less than 100"); System.exit (-1); } // the rest of the program Boolean Operators: allow us to join multiple condition together into a single condition statement