LECTURE NOTES OCTOBER 4 2004 ANNOUNCEMENTS First Midterm Exam Regular Time Tuesday October 5 5:00-7:00 pm 1227 Engr Hall Different proctor Alternate Time (prearranged) Tuesday October 5 7:00-9:00 pm 1221 CSS I will proctor Bring several #2 pencils and your UW student ID Review Session Today 6-9 pm CSS 1325 ASSIGNMENTS Fri 10/8 11:58 PM CodeLab #5 MORE ARITHMETIC OPERATORS Why? - adding one to something is very common What? - increment operator How? ++; Why? - subtracting one from something is very common What? - decrement operator How? --; BOOLEAN EXPRESSIONS What? - boolean values How? - true/false - reserved words Why? - generate booleans from other data What? - *relational operator* How? < <= == != > >= What? - comparing reference types How? - using == only compares values directly: whether or not they point to the same address - writing comparison methods in classes to compare object data members What? - String comparison methods How? - equals - equalsIgnoreCase What? - *boolean expression* What? - *boolean operator* - *logical operator* How? && || ! What? - reversing relational operators - DeMorgan's Law How? - change the sign and the presence of the = - negate the boolean expression Why? - recognizing run-time errors What? - *short-circuit evaluation* How? - e.g. *divide-by-zero error* Why? - avoid short circuiting - not used in this course How? | and & operators