cs246e-notes
cs246e-notes copied to clipboard
Object oriented programming notes
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
- A Big Unit on Object Oriented Design
- 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
- Valgrind + GDB
- Recursive Descent
Index
Work in progress (feel free to contribute)!
A
- Abstract Class
- 20
- Adapter Pattern
- A Big Unit on OO Design
- Anonymous Namespace
- 3
- Argument-Dependent Lookup (ADL)
- 3
B
- Basic Guarantee
- 14
C
- Class
- 7
- Cohesion
- A Big Unit on OO Design
- Const Cast
- 21
- Const Overloading
- 6
- Concrete Class
- 20
- Contravariance Problem
- A Big Unit on OO Design
- Copy and Swap Idiom
- 4
- Copy Constructor
- 4
- Copy/Move Elision
- 5
- Coupling
- A Big Unit on OO Design
- The Curiously Recurring Template Pattern (CRTP)
- 26
D
- Decorator Pattern
- A Big Unit on OO Design
- Destructor
- 3
- Dependency Inversion Principle
- A Big Unit on OO Design
- Dynamic Cast
- 21
E
- Exception Safety
- 14
F
- Factory Method Pattern
- A Big Unit on OO Design
- Friend
- 8
- Forwarding Reference
- 13
G
H
I
- Initializer List
- 11
- Inline
- 6
- Interface Segregation Principle
- A Big Unit on OO Design
- Iterator
- 8
J
K
L
- Liskov Substitution Principle
- A Big Unit on OO Design
M
- Makefile
- 1
- Member Initialization List
- 3
- Move Assignment
- 5
- Move Constructor
- 5
N
- Namespaces
- 2
- Non-Virtual Interface (NVI) Idiom
- A Big Unit on OO Design
- Nothrow Guarantee
- 14
- Nullptr
- 2
O
- Observer Pattern
- A Big Unit on OO Design
- Open/Closed Principle
- A Big Unit on OO Design
P
- Partial Assignment
- 21
- Polymorphism
- 18
- Pure Virtual Function
- 20
Q
R
- Reference
- 1
- Reinterpret Cast
- 22
- Resource Acquisition is Initialization (RAII)
- 14
- Round Bracket Initialization
- 11
- Run-Time Type Information (RTTI)
- 21
- Rvalue Reference
- 5
S
- Separate Compilation
- 1
- SFINAE (Substitution Failure Is Not An Error)
- 25
- Single Responsiblity Principle
- A Big Unit on OO Design
- SOLID Principles of OO Design
- A Big Unit on OO Design
- Static Cast
- 22
- Strong Guarantee
- 14
- Superclass
- 18
T
- Template
- 10
- Template Metaprogramming
- 24
U
- Unique Pointer
- 14
- Universal Reference
- 13
- UML
- A Big Unit on OO Design
V
- Virtual
- 18
- Virtual Constructor Pattern
- A Big Unit on OO Design
- Visitor Pattern
- A Big Unit on OO Design
- Vtable
- 18
W
X
Y
Z
Course Information (Fall 2017)
Brad Lushman
DC 3110
[email protected]
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 [email protected]
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