##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Learn object-oriented programming. Create classes with member variables, methods, and constructors.
The Goal
User-defined types
Concrete entities
Basic structure
Declaring instances
Default access
Controlling visibility
Hiding internals
Conditional execution
Object state
Object behavior
Member access
Using objects
Knowledge check
Self-reference
Controlled access
Initialization function
No parameters
Custom data types
Custom initialization
Multiple constructors
Efficient initialization
Knowledge check
Cleanup function
Implementation details
Acquisition is initialization
Automatic invocation
Custom data types
Knowledge check
Copying objects
Shallow vs deep copy
Default access
Knowledge check
Class-level data
Read-only methods
Member access
Knowledge check
Build complete class
RAII practice
Default access
Knowledge check
Force equilibrium check
Encapsulating vector data
Breaking it down
Default access
Complete solution
summary
Color matching check
Pairing and checking
Breaking it down
Default access
Complete solution
summary
What we learned