Lecture 3
We finished up the definition of the card classes from last class and
discussed briefly the following:
- Objects are represented as references and assignment is sharing.
Use "equals" rather than "==" for equality.
- Parameter passing: Parameters are passed by "sharing". Sending
messages to objects can change their internal state. Assigning to a
formal parameter is discouraged as it has no impact on the actual
parameter and you lose the sharing.
- How to use Random with the LottoHelper program:
- Standard Java graphics. See the handout for
details and examples.
- Handling exceptions in Java
- Packages and information hiding