This repository contains a collection of educational material and exercises for learning basic object-oriented programming in C++. The material is intended for students who have some experience with programming in C++, but who have not yet learned object-oriented programming. See the course website for more information. This can be used to teach basic object-oriented programming concepts. The material is designed to be used in a classroom setting, but can also be used for self-study.
The author of the course material is Msc. Nguyen Minh Huy, lab exercises are being used in the course belong to the Msc. Tran Duy Quang, both are Lecturers of Software Engineering at the University of Science, HCMC.
There are missing lecture notes in this repository. We would greatly appreciate contributions from anyone in the VNU course community to help fill these gaps.
Requirement: You need to have a C++ compiler installed on your computer. You can use any compiler you like, but the following instructions are for the GNU C++ compiler (g++). If you are using a Linux computer, you can install the g++ compiler using the following command.
sudo apt-get install g++
sudo apt-get install make
Learn how to compile source code for this course using the Makefile and the template directory.
Disclaimer: This material is provided as-is. The author is not responsible for any errors or omissions in the content of this material. The author does not guarantee that the material is complete, correct, and/or up-to-date. Be responsible with your learning.
-
- Coding convention
- Function overloading
- Introduction to generic programming
- LAB 01: Working with arrays from the keyboard
-
- Object and class
- Class syntax and member functions
- Scope and access control
- LAB 02: Class & Object Basic
-
- Constructors and destructors
- Static members
- Class Templates
- LAB 03: Serialization & Deserialization
-
- Types of operators
- Special operators
- Class operators
- LAB 04: Aggregation
-
Week 05: The big three and Encapsulation
- Pointer problems
- Encapsulation
- LAB 05: Class Template
-
- Inheritance
- Scope and access control in inheritance
- Re-implementing member functions
- IS-A and HAS-A relationships
- LAB 06: Midterm exam - Employee salary
-
Week 07: Object life cycle in inheritance
- Constructors and destructors in inheritance
- Pointers and inheritance
- LAB 07: Working with list of objects
-
Week 08: Interface and polymorphism
- Interface
- Virtual functions and dynamic binding
- Virtual destructors
- LAB 08: Shapes, Employees, RenamingRules
-
Week 09: Seminar - Introduction to template metapgrograming
- Metafunction
- Compile-time programming
- Concepts
- LAB 09: Polymorphism
-
- Creational patterns
- Structural patterns
- Behavioral patterns
- LAB 10: Final exam - Display table of students