Skip to content

Exploring advanced C++ and OOP concepts like abstraction, encapsulation, simple and multiple inheritance, polymorphism, interfaces, and so on

Notifications You must be signed in to change notification settings

pin3dev/42_CPP_Modules_00-04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPP-Modules_00-04 100/100

Table of Contents

Overview

The cpp_modules_00-04 projects revolves around mastering advanced C++ concepts such as:

  • Abstraction
  • Encapsulation
  • Simple and multiple inheritance
  • Polymorphism
  • Interfaces
  • Fixed Point and Floating Point Number Representations
  • Overload Operators

Guidelines

Compilation:

  • Compile your code using c++ with flags -Wall -Wextra -Werror -std=c++98
  • Exercise directories: ex00, ex01, ..., exn
  • Separate Makefile within each exercise directory.
  • Use UpperCamelCase for class names.

Forbidden:

  • Functions: *printf(), *alloc(), free()
  • External libraries like C++11, Boost
  • Using namespace <ns_name> and friend keywords.
  • Until you reach the Module 08: STL, meaning no Containers (vector list map and so forth) and no Algorithms (anything that requires to include the <algorithm> header).
  • Memory leaks when using new.
  • Function implementations in header files (except for function templates).

Allowed:

  • Use standard library extensively.
  • Additional files allowed if necessary.

Rule:

Follow the Orthodox Canonical Form for classes Modules 02-09, which must implement four essential member functions:

  • Default constructor
  • Copy constructor
  • Copy assignment operator
  • Destructor
  • Split class code into two files: Header file .hpp/.h for class definition, and Source file .cpp for implementation

Features

Module 00: String class, Abstraction, Encapsulation

Module 01: Memory Allocation, References vs Pointers, Switch cases and Callbacks Functions

Module 02: Orthodox Canonical Form, Fixed-point Number Class implementation, Overload Operators

Module 03: Abstract Classes, Single Inheritance, Multiple Inheritance, Diamond Inheritance

Module 04: Polymorphism and Interfaces

Execution

Each exercise's compilation is done separately by running the Makefile within the exercise's folder.

#in the ex00, ex01, ex02 or ex03 directory
$>make

Links2Study

Grade Modules Lang Type Links and Subjects
🤩 CPP00 CPP04 🇺🇸 📄📚 Standard Library Headers
CPP00 🇺🇸 💭 char* vs std:string
🤩 CPP00 🇺🇸 📄 char* vs std:string vs char[]
CPP00 🇧🇷 📄 CHAR * VS STD: STRING VS CHAR [] EM C++
CPP00 CPP04 🇺🇸 📄 Complete OOP Concepts
CPP00 CPP04 🇺🇸 📄 OOPs Concepts in C++
CPP01 🇺🇸 📄 A Comprehensive Look at C++ Reference
CPP02 🇺🇸 📄 Fixed Point and Floating Point Number Representations
CPP02 🇺🇸 📄 Floating point number representation
🤩 CPP02 🇺🇸 📄 Introduction to Fixed Point Number Representation
🤩 CPP02 CPP04 🇺🇸 📄 Operator Overloading in C++
CPP02 CPP04 🇺🇸 📄 C++ Overloading (Operator and Function)
🤩 CPP02 CPP04 🇺🇸 📄 Types of Operator Overloading in C++
⭐⭐ CPP02 CPP04 🇺🇸 📄 Copy Constructor vs Assignment Operator in C++
CPP03 CPP04 🇺🇸 📄 Inheritance in C++
CPP03 CPP04 🇺🇸 💭 C++ inheritance downcasting
⭐⭐ CPP04 🇺🇸 📄 Interfaces in C++
CPP04 🇺🇸 📄 C++ Program to Create an Interface

✅ OK | ⭐ Good | ⭐⭐ VeryGood | 🤩 Amazing | 🔖 Bookmarked2Read
📄 Blog | 💭 Chat | 📹 Video | 📚 Book