Loading lesson path
C++
C++ Classes focused on C++ OOP and related concepts.
OOP stands for Object-Oriented Programming.
C++ is an object-oriented programming language.
Methods are functions that belongs to the class.
A constructor is a special method that is automatically called when an object of a class is created.
In C++, you can have more than one constructor in the same class. This is called constructor overloading .
Access specifiers control how the members (attributes and methods) of a class can be accessed.
Think of an employee's salary:
Normally, private members of a class can only be accessed using public methods like getters and setters . But in some cases, you can use a special function called a friend function to access them dir…
Inheritance allows one class to reuse attributes and methods from another class. It helps you write cleaner, more efficient code by avoiding duplication.
A class can also be derived from one class, which is already derived from another class.
A class can also be derived from more than one base class, using a comma-separated list:
You learned from the Access Specifiers chapter that there are three specifiers available in C++.
Polymorphism means "many forms", and it occurs when we have many classes that are related to each other by inheritance.
A virtual function is a member function in the base class that can be overridden in derived classes.
Templates let you write a function or class that works with different data types.
The fstream library allows us to work with files.
The <ctime> library allows us to work with dates and times.