ITEC 120: Week 5
- QUIZ 3 on TUESDAY! Based on
Homework 3. Topics:
- String methods
- Aliases
- Reading method declarations and using methods (class Math)
- Generating Random Numbers
- Program 1 due Tuesday midnight.
- LAB QUIZ 2 on FRIDAY!
- Lab 8
- Selected Topics from Chapter 3:
- Static Method calls and class Math
- Wrapper Classes
- Autoboxing (Warning: this violates type rules!)
- Enumerated types
- Selected Topics from Chapter 4:
- Wirth: Algorithms + Data Structures = Programs!
- RollingDice.java is a client of the Die class in Die.java (ie makes use of services)
- Objects have State and Behavior (and Identity)
- State - current value, defined by variables in class
- Behavior - actions object can take, defined by methods in class
- Identity - can create multiple instances of a given object
- State, Behavior, Identity for Students, Formatters, Die
- Class Die: State and behavior
- Fields: Instance data declared inside a class
- Fields: Each instance the fields
- Fields: different from variables declared inside methods
-
Chapter 3 Powerpoint Slides
Chapter 4 Powerpoint Slides
Examples from Chapter 3
Examples from Chapter 4