CS300/500 Advanced Object-Oriented Programming in C++
Course Overview
This course introduces object-oriented programming and modern C++ for building modular and reliable software.
Students learn core object-oriented concepts, including classes, inheritance, polymorphism, and operator overloading;
generic programming with templates and the Standard Template Library (STL);
and safe resource management using RAII, smart pointers, and move semantics.
These concepts are applied through the incremental development of a multilayer perceptron (MLP), with hands-on practice in compilation, debugging, testing, and version control.
Course Objectives
- Explain and apply core object-oriented programming concepts, including classes, encapsulation, inheritance, and polymorphism.
- Use dynamic memory management, templates, the STL, and modern C++ features such as smart pointers to build modular, efficient, and reliable programs.
- Integrate these concepts to design and implement a Matrix class and a multilayer perceptron (MLP), with practical experience in compilation, debugging, testing, and version control.
Topics
-
Part I: C++ Basics
- Variables, Functions, and Control Flows
- Operators and Overloading
-
Part II: C++ Memory and Language Mechanics
- Pointers and References
- Stack vs. Heap Memory, and dynamic memory management
-
Part III: Object-Oriented Programming in C++
- Constructors and Destructors
- Class Inheritance and Abstract Classes
- Polymorphism and Virtual Functions
-
Part IV: Templates and STL
- Templates
- STL: Containers, Iterators, and Algorithms
-
Part V: C++ Engineering
- File I/O and Exceptions
- RAII, Smart Pointers, and Move Semantics
- Implementing Matrices, Tensors, and a MLP
Schedule
| Date |
Topics |
Code Demo |
Due |
| 08/25 (T) | Course Introduction | Syllabus | Lab 1 |
| 08/27 (Th) | Varialbes, Functions, and Control Flows | | |
| 09/01 (T) | Operators, and Overloading | Overloading + and << | Lab 2 |
| 09/03 (Th) | Pointers, References, andconst Keyword | Pass by Value vs. Reference | |
| 09/08 (T) | Array and String | C Strings vs. std::string | Lab 3 |
| 09/10 (Th) | Stack vs. Heap memory, new and delete | Linked List | |
| 09/15 (T) | Class Basics | Member Operator Overloading | Lab 4 |
| 09/17 (Th) | Shallow Copy vs. Deep Copy | Matrix Deep Copy | |
| 09/22 (T) | Demo: a Matrix Class | Matrix + and * | Lab 5 |
| 09/24 (Th) | Demo: a MLP Class | Linear/ReLU, Forward Pass | |
| 09/29 (T) | Review for Mid-term Exam | | |
| 10/01 (Th) | Mid-term Exam | | |
| 10/06 (T) | Class Inheritence | | Lab 6 |
| 10/08 (Th) | Class Polymorphism | | |
| 10/13 (T) | Demo: MLP.v2 | | Lab 7 |
| 10/15 (Th) | Templates | | |
| 10/20 (T) | STL containers | | Lab 8 |
| 10/22 (Th) | STL containers | | |
| 10/27 (T) | Demo: MLP.v3 | | Project 1 |
| 10/29 (Th) | Smart Pointer | | |
| 11/03 (T) | RAII, Move Semantics | | |
| 11/05 (Th) | Demo: MLP.v4 | | |
| 11/10 (T) | Review for Mid-term Exam | | |
| 11/12 (Th) | Mid-term Exam 2 | | |
| 11/17 (T) | File I/O and Exceptions | | |
| 11/19 (Th) | Demo: MLP for Image Classification | | |
| 11/24 (T) | Thanksgiving Break, No Class | | Project 2 |
| 11/26 (Th) | | | |
| 12/01 (T) | Hands-on Project Development, No Class | | |
| 12/03 (Th) | | | |
| 12/08 (T) | Exam Week, No Class | | |
| 12/10 (Th) | | | |
Grading Policy
- Lab Assignments (20%):
There are weekly lab assignments conducted during the scheduled lab sessions. These hands-on coding exercises reinforce concepts introduced in lectures and provide regular practice in programming and problem-solving.
- Projects (40%):
There will be 2 projects designed to provide hands-on experience with C++ programming, with a particular focus on implementing matrix, tensor, and a simple neural networks. Each project requires a report describing the design, implementation, test, and individual contributions.
- Midterm Exams (30%):
The course will include 2 midterm exams. The midterm exams are periodic assessments that focus only on the material covered since the previous exam.
- Participation (10%):
Class participation is assessed primarily through in-class attendance. Students are expected to attend class regularly and participate actively.