FAST-NUCES · Spring 2023 · CS1004

Object-Oriented Programming

My second-semester Object-Oriented Programming course work in C++ – lecture slides and notes, fifteen weekly labs with my solutions, assignments, quizzes, exams, practice questions and final projects, from pointers and structures to classes, operator overloading, inheritance, polymorphism, file handling and exceptions.

Course: CS1004 Language: C++ FAST-NUCES Spring 2023 IDE: Visual Studio
22Lectures
15Labs
477C++ files
102PDF documents
30Screenshots
1043Files in total

Overview

Object-Oriented Programming (CS1004, lab CL1004) at FAST-NUCES Islamabad, Spring 2023, taught in C++. The course folder holds the lecture slides and notes grouped by topic, four assignments, quizzes, exams, practice questions, the textbook and the final projects. The lab folder has the fifteen weekly lab handouts with my Visual Studio solutions, the lab assignment, quiz, mid and final exam.

Unit 1

C++ foundations

Pointers, memory layout, dynamic memory, 2D arrays, recursion and structures.

Unit 2

Classes & objects

Classes, constructors, copy constructors, deep vs shallow copy, the this pointer, static and const members.

Unit 3

Overloading & relationships

Operator overloading, friend functions, association, aggregation, composition and inheritance.

Unit 4

Polymorphism & I/O

Virtual functions, abstract classes, file handling with streams and exception handling.

Lectures

Lectures 1–22 grouped by topic, with slides, notes and homework. Every file opens on GitHub, where PDFs preview in the browser.

01–06Pointers135 files

Open folder on GitHub · 135 files

07–08Recursion47 files
09–10Structures25 files
11–13Classes35 files
14–16Operator Overloading12 files
17–18Inheritance6 files
19Association17 files
20Polymorphism3 files
21Abstraction7 files
22File Handling22 files

Labs

Fifteen weekly labs plus the lab assignment, quiz, mid and final exam, with my C++ solutions.

01Visual Studio setup and Google TestLab # 01 · 219 files

Open folder on GitHub · 219 files

02File handlingLab # 02 · 27 files
03Memory layout, pointers and dynamic memoryLab # 03 · 40 files
04Pointer revision and recursionLab # 04 · 29 files
052D and 3D arraysLab # 05 · 20 files
06Pointer questionsLab # 06 · 7 files
07StructuresLab # 07 · 11 files
08Classes and access specifiersLab # 08 · 5 files
09Constructors: Account and Bank classesLab # 09 · 14 files
10Constructors and the copy constructorLab # 10 · 19 files
11Shallow copy vs deep copyLab # 11 · 11 files
12Operator overloadingLab # 12 · 14 files
13InheritanceLab # 13 · 10 files
14Types of inheritanceLab # 14 · 17 files
15Abstract classes and pure virtual functionsLab # 15 · 11 files
A2Lab assignment 2 and reportLab Assignment · 12 files
FinalLab final exam paper and solutionsLAB FINAL EXAM · 21 files
QuizLab quiz and practice questionsLAB QUIZ · 3 files
MidLab mid examLab Mid · 1 file

Assignments, Exams & Projects

Assignments, quizzes, exams, practice questions, the final projects and extra topics.

–Assignments53 files
–Exams14 files
–Exception Handling15 files
–Final Projects86 files
–Graphics In C++9 files
–OOP Summary7 files
–Practice Questions47 files
–Quizzes11 files
–Text Book1 file

Large Files

Three videos are attached to Release v1.0.

The rotate-matrix and gameplay videos are bigger than GitHub's 100 MB file limit, and the short Vulcan clip is kept with the gameplay video. Visual Studio build output (.vs/, x64/, object files) and NuGet packages/ are left out and listed in .gitignore; building a solution recreates them.

Folder Structure

Folder structure
OPP_Repository/
├── OPP COURSE/
│   ├── Assignments/  (53 files)
│   ├── Exams/  (14 files)
│   ├── Exception_Handling/  (15 files)
│   ├── Final Projects/  (86 files)
│   ├── Graphics In C++/  (9 files)
│   ├── Lecture # 01 - 06 ( Pointers )/  (135 files)
│   ├── Lecture # 07 + 08 ( Recursion )/  (47 files)
│   ├── Lecture # 09 + 10 ( Structures )/  (25 files)
│   ├── Lecture # 11 + 12 +13   ( CLASSESS )/  (35 files)
│   ├── Lecture # 14 + 15 + 16 (Operator_Overloading )/  (12 files)
│   ├── Lecture # 17 + 18 ( Inheritence )/  (6 files)
│   ├── Lecture # 19 ( Association )/  (17 files)
│   ├── Lecture # 20 ( Polymorphism )/  (3 files)
│   ├── Lecture # 21 ( Abstraction )/  (7 files)
│   ├── Lecture # 22 ( File_Handling )/  (22 files)
│   ├── OPP Summary/  (7 files)
│   ├── Practice Questions/  (47 files)
│   ├── QUIZES/  (11 files)
│   └── Text_Book/  (1 file)
├── OPP LAb/
│   ├── Lab # 01/  (219 files)
│   ├── Lab # 02/  (27 files)
│   ├── Lab # 03/  (40 files)
│   ├── Lab # 04/  (29 files)
│   ├── Lab # 05/  (20 files)
│   ├── Lab # 06/  (7 files)
│   ├── Lab # 07/  (11 files)
│   ├── Lab # 08/  (5 files)
│   ├── Lab # 09/  (14 files)
│   ├── Lab # 10/  (19 files)
│   ├── Lab # 11/  (11 files)
│   ├── Lab # 12/  (14 files)
│   ├── Lab # 13/  (10 files)
│   ├── Lab # 14/  (17 files)
│   ├── Lab # 15/  (11 files)
│   ├── Lab Assignment/  (12 files)
│   ├── LAB FINAL EXAM/  (21 files)
│   ├── LAB QUIZ/  (3 files)
│   └── Lab_Mid/  (1 file)
├── assets/
│   ├── screenshots/   30 images
│   ├── thumbs/        gallery previews
│   ├── css/  js/      website
├── index.html
├── .gitignore
├── LICENSE
└── README.md

Get the Files

Clone everything with Git, then build any lab in Visual Studio or with g++.

Clone the repository

Command
git clone https://github.com/rohaan2802/OPP_Repository.git

Build a single-file program

Command
cd "OPP LAb/Lab # 15/Task 2/Task 2" && g++ -std=c++17 main.cpp -o media && ./media

The lab solutions are Visual Studio 2022 projects: open any .sln file and press Ctrl + F5.

License

Lecture slides, lab handouts, assignment statements and textbooks belong to their instructors at FAST-NUCES and to their authors and publishers. They are shared here only for learning and revision – see LICENSE. My own notes, code and the organisation of this repository are free to use for study.