CS100A, Fall 1998
This lecture covers the declaration of variables, assignment, and the if statement.
While discussing the declaration of variables, it will be important to mention that variables have meaning and that writing down that meaning at the point of declaration is extremely important for developing correct programs and for understanding programs.
At this point in the course, the only types the students have seen is int, float, long, and the like; they don’t know what a class is.
We will mention the modifier final, which is used for constants.
The debugger will be used in the lecture to demonstrate execution of the assignment. For example, after slide 5 is discussed, we’ll illustrate execution of that program within the debugger, showing carefully how variable timeOfDay changes during execution. The debugger will be used to illustrate assignment, declaration of a final variable (a constant), and the if statement.