9. 19-05-2023 Vishnu Priya 9
Inheritance
Inheritance is the ability to define a new class or object that inherits the
behaviour and its functionality of an existing class.
• The new class or object is called a child or subclass or derived class while
the original class is called parent or base class.
12. 19-05-2023 Vishnu Priya 12
Polymorphism
As name suggests, Polymorphism means an ability to assume different
forms at different places.
There are two types of polymorphism.
• Compile time polymorphism - It is achieved by overloading
functions and operators
• Run time polymorphism - It is achieved by overriding virtual
functions
14. 19-05-2023 Vishnu Priya 14
Encapsulation
Encapsulation is a method for protecting data from unwanted access or
alteration by packaging it in an object where it is only accessible
through the object's interface. Encapsulation are often referred to as
information hiding.
17. Abstraction
Abstraction is a process of identifying the relevant qualities and
behaviors an object should possess.
A Laptop consists of many things such as processor, motherboard,
RAM, keyboard, LCD screen, wireless antena, web camera, usb ports,
battery, speakers etc.
To use it, you don't need to know how internally LCD screens,
keyboard, web camera, battery, wireless antena, speakers works.
You just need to know how to operate the laptop by switching it on.
The intrinsic details are invisible.