OOPs-in-CPP
OOPs-in-CPP
Topperworld.in
OOPs Concept
©Topperworld
C++ Programming
❖ Class
• A Class is a user-defined data type that has data members and member
functions.
• Data members are the data variables and member functions are the
functions used to manipulate these variables together these data
members and member functions define the properties and behavior of
the objects in a Class.
• In the above example of class Car, the data member will be speed limit,
mileage, etc and member functions can apply brakes, increase speed,
etc.
❖ Object
class person {
char name[20];
int id;
public:
void getdetails() {}
};
©Topperworld
C++ Programming
int main()
{
❖ Encapsulation
❖ Abstraction
©Topperworld
C++ Programming
❖ Polymorphism
©Topperworld
C++ Programming
❖ Inheritance
❖ Dynamic Binding
©Topperworld
C++ Programming
❖ Message Passing
©Topperworld