CPS 6, Ramm - Summer Semester I - 5/30/00 #9
- Announce
- Review Today
- No Lab Today
- Exam Tomorrow
Chapt 5. Iteration with Programs and Classes
- The Date Class
- Many constructors
- Look at header for interface
date.h
- Monday Blues
mondays.cpp
R E V I E W T O P I C S
- Functions
- Function Call
- Flow of Control
- Functions with Parameters
- Functions with several parameters
- Functions Invoking Functions
- Order of Functions
- Function Prototypes
- Output, Stream Insertion Operator
<<
- Literals: string, integer, real, expressions
- Programming Rules
- Syntax/Grammar
- Semantics/Meaning
- Style Important
- Complexity: Measuring Computer Resources
- IPO Model of a Program
- Programing Strategy
- Divide and Conquer
- Iterative Enhancement
- Input, Stream Extraction Operator
>>
- Definition/Creation/Memory
- Processing Numbers
- Type:
int Numbers
- Type:
double Numbers
- Arithmetic Operators/Operands
- Operator Precedence
- Automatic
int to double conversion
- Classes and Types
- Objects and Variables
-
if and if/else Statement
- Relational Operators
- Logical Operators
- Value of Relational Operations
- Short Circuit Evaluation
- Assignment Statement: ... = ...
- More C++ Operator Precedence
- Functions that Return Values
- Use Functions Like Variables
- Designed "Curving" Functions
- Looked at numtoeng.cpp
- The
string Member Functions
- Length:
int length()
- Substring:
string substr(int pos, int len)
- Find:
int find(string s)
- Member Function vs Free Function
- Preconditions and Postconditions for Functions
- Iteration
- Pre-tested and Post-tested Loops
-
while Loop
-
for Loop
-
do while Loop
- Defining Constants
- Infinite Loops
-
break Statement
- Nested Loops
- Scope of Variables
- Classes
- Class:
dice
- Constructors
- The Dice Interface
- The Date Class
- Class Overview
- Dice Implementation
- Scope of Private Variables