CS231 (Sp03) Review Topics for Exam 1


Exam date: Thursday Feb 20, 2003

Additional Facts you need to know:

  1. Information is stored in variables
  2. Variables must be declared
  3. To declare a variable you write a type followed by an identifier
  4. Variables have 3 attributes: name, type, and value
  5. The name and type are specified in the declaration
  6. The value is variable (!) and is set only by assignment statements
  7. Variables inside objects are called instance variables (because there is one for each instance of the class (i.e. one for each object of that type))
  8. Instance variables are autoinitialized to 0
  9. You may initialize them to something else by default
  10. To access instance variables from outside an object (i.e. from another object), you use accessors.
  11. There are two kinds of parameters, formal (variables), and actual (values).
  12. When you define a method you declare formal parameters.
  13. When you send a message, you include actual parameters (they have actual values)
  14. Action is performed by sending messages to objects (including optional parameters if more information is needed)
  15. You must create an object before you can send it messages.

[top]

[CS 231 Lectures Page]