











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












Class : The building block of C++ that leads to Object-Oriented programming is a Class. It is a user- defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. A class is like a blueprint for an object. Eg : A Car can be a class defining a model by concept. Car can have different properties like color, cost, max speed etc. These are called data members. Object: Object is an instance of a class. It can be considered an entity with some characteristic and behavior. When a class is defined, no memory is allocated but when it is instantiated (i.e. an object is created) memory is allocated. Eg. Maruti can be consider an object of car.
#include
Example of Polymorphism