CS 246 Enriched (Object Oriented Programming) Notes
Course information at the bottom of the page.
These notes cover CS 246E in Fall 2017, the first offering of the course. The textbook used is The C++ Programming Language, reading sections are referenced to this book.
Table of Contents
- Program Input / Output
- Linear Collections and Modularity
- Linear Collections and Memory Management
- Copies
- Moves
- I want a constant vector
- Tampering
- Efficient Iteration
- Staying in bounds
- I want a vector of chars
- Better Initialization
- I want a vector of Posns
- Less Copying!
- Memory management is hard!
- Is vector exception safe?
- Insert/remove in the middle
- Abstraction over containers
- Heterogeneous Data
- I'm leaking!
- I want a class with no objects
- The copier is broken
- I want to know what kind of Book I have
- Shared Ownership
- Abstraction over Iterators
- I want an ever faster vector
- Collecting Stats
- Resolving Method Overrides at Compile Time
- Polymorphic Cloning
- Logging
- Total Control
- I want total control over vectors and lists
- A fixed-size allocator
- I want a (tiny bit) smaller vector class
Other
Index
Work in progress (feel free to contribute)!
A
- Abstract Class
- Adapter Pattern
- Anonymous Namespace
- Argument-Dependent Lookup (ADL)
B
- Basic Guarantee
C
- Class
- Cohesion
- Const Cast
- Const Overloading
- Concrete Class
- Contravariance Problem
- Copy and Swap Idiom
- Copy Constructor
- Copy/Move Elision
- Coupling
- The Curiously Recurring Template Pattern (CRTP)
D
- Decorator Pattern
- Destructor
- Dependency Inversion Principle
- Dynamic Cast
E
- Exception Safety
F
- Factory Method Pattern
- Friend
- Forwarding Reference
G
H
I
- Initializer List
- Inline
- Interface Segregation Principle
- Iterator
J
K
L
- Liskov Substitution Principle
M
N
- Namespaces
- Non-Virtual Interface (NVI) Idiom
- Nothrow Guarantee
- Nullptr
O
- Observer Pattern
- Open/Closed Principle
P
Q
R
- Reference
- Reinterpret Cast
- Resource Acquisition is Initialization (RAII)
- Round Bracket Initialization
- Run-Time Type Information (RTTI)
- Rvalue Reference
S
- Separate Compilation
- SFINAE (Substitution Failure Is Not An Error)
- Single Responsiblity Principle
- SOLID Principles of OO Design
- Static Cast
- Strong Guarantee
- Superclass
T
U
- Unique Pointer
- Universal Reference
- UML
V
- Virtual
- Virtual Constructor Pattern
- Visitor Pattern
- Vtable
W
X
Y
Z
Course Information (Fall 2017)
Brad Lushman
DC 3110
bmlushma@uwaterloo.ca
https://www.student.cs.uwaterloo.ca/~cs246e
Must use Linux:
Windows:
putty.exe
- connect to linux.student.cs.uwaterloo.ca
- enable X11 forwarding
- win scp
Mac/Linux:
- terminal, ssh userid@linux.student.cs.uwaterloo.ca
Also Install xwindows server, eg. Xming, XQuartz
TUTORIAL ATTENDANCE IS MANDATORY!
Goals:
- Meet the CS 246 objectives, more breadth, more depth
- A course on abstraction
- Demand-driven, problem-oriented presentation, introduce C++ concepts as needed
- Linux tools on the side/tutorials