CPS 6, Ramm - Summer Semester I - 5/29/00 #8
- Announce
- Quiz Today
- Next "Quiz"
- Exam on Wednesday
- Review Tomorrow
- No Lab Tomorrow
Chapt 5. Iteration with Programs and Classes
- Scope of Variables
- definition
- braces { }
- Private Variables
- Global Variables (XXX)
- Class Example: Random Numbers & N-sided Dice
- Class:
dice
- Using dice
roll.cpp
- Class Diagram
- Public
- constructor
- member functions
- Private
- Constructors
- The Dice Interface
dice.h
"Declaration" not code (not Definition)
- Dice Implementation
dice.cpp
- Dice/While Example
roll300.cpp
"Validate" by Inspection ?
- The Date Class
- Many constructors
- Look at header for interface
date.h
- Monday Blues
mondays.cpp