Object Oriented Programming
Object Oriented Programming
Programming
Object-Oriented Programming
Object-oriented programming is a method of implementation in which programs are
organized as cooperative collections of objects, each of which represents an instance of some
class, and whose classes are all members of a hierarchy of classes united via inheritance
relationships.
Abstraction focuses
on the observable behavior of an object, whereas
encapsulation focuses on the
implementation that gives rise to this behavior. For
abstraction to work, implementations must be
encapsulated. Abstraction and encapsulation are
complementary concepts.
Encapsulation: Example-Employee in LMS
Modularity
Modularity
Modularity
Modularity
Hierarchy
Object and Class
Object: Any entity that has state and behavior is known as an object. For example: chair,
pen, table, keyboard, bike etc. It can be physical and logical.
Derived Classes: A Derived class is defined as the class derived from the base class.
Types Of Inheritance
C++ supports five types of inheritance:
•Single inheritance
•Multiple inheritance
•Hierarchical inheritance
•Multilevel inheritance
•Hybrid inheritance
Types Of Inheritance