Learn C++: Classes and Objects
Build your own C++ types: classes with members, public and private access, constructors, destructors and member functions defined outside the class in a header and source pair, then design a library card class in a project.
- Beginner level
- 2 modules
- 8 lessons
- 39 tasks and questions
Syllabus
01Classes and ObjectsCreate your own types with classes. Give them data members and member functions, protect their data with access specifiers, set them up with constructors, clean up with destructors, and split declarations from definitions.6 lessons
02ProjectDesign a small class from scratch: a library card that enforces borrowing rules through its public interface, keeps its titles in a vector and splits a definition away from its declaration.2 lessons