AP Computer Science Workshop
The AP CS C++ Idiom
- C++
- Classes and Objects
Declaring Classes (with Line example)
Constructing and Using Objects (more Line examples)
Example: Palindrome Program
Defining Member Functions (more Line examples)
Example: Fraction.h and Fraction.cpp
- Details and the AP CS Idiom
- Constructors and Initialization Lists, Copy and Conversion Constructors
- Accessors vs Modifiers
- Const, const, const, const, ...
- Pass-by-value, Pass-by-reference, Pass-by-const-ref
- Helper Member Functions (i.e., Avoiding Friends)
Example: Fraction.h and Fraction.cpp- Preconditions and Postconditions
- Marine Biology Case Study and Teacher's Guide
- Some More Info about Basic C++
Alyce Brady, Kalamazoo College