Unit-1
Fundamentals of OOP
Namespaces
Objects
Class
Data Members
Methods and Messages
Message Passing
Data Encapsulation
Data Abstraction and Information Hiding
Inheritance
Polymorphism
Benefits of OOP
Drawbacks
C++
Separating Interface from Implementation
Constructors
Copy Constructor
Memory Requirement
Inline Function
Friend Function
Fundamentals of OOP
Namespaces
Group the entities like class, variables, objects and functions under the same name.
Helps to divide global scope into sub scopes where sub scope has its own nature. eg.
using
All the files in the C++ standard library declare all its entities within the std namespace.
Unit-1 1
, using namespace std;
Objects
Instance of a class. Basic run time entities in OOP.
Class
A class can be defined as an entity in which data and functions are put together.
Data Members
The data members are the variables that are declared within the class along with the
data types. The access specifiers to these members can be private, public or protected.
Methods and Messages
The functions of a class are called methods.
Message Passing
Mechanism which allows the objects to interact with each other. Its process is given as
follows:
1. Define the class with data members and member functions.
2. Create the objects belonging to the class
3. Establish communication between these objects using the methods.
Data Encapsulation
It means binding of data and method together in a single entity called class. The data
inside the class is accessible by the methods in the same class.
Data Abstraction and Information Hiding
Representation of only essential features by hiding all the implementation details. Data
that is declared as private then only member functions of the class can access it. This is
called data hiding.
Unit-1 2
Unit-1
Fundamentals of OOP
Namespaces
Objects
Class
Data Members
Methods and Messages
Message Passing
Data Encapsulation
Data Abstraction and Information Hiding
Inheritance
Polymorphism
Benefits of OOP
Drawbacks
C++
Separating Interface from Implementation
Constructors
Copy Constructor
Memory Requirement
Inline Function
Friend Function
Fundamentals of OOP
Namespaces
Group the entities like class, variables, objects and functions under the same name.
Helps to divide global scope into sub scopes where sub scope has its own nature. eg.
using
All the files in the C++ standard library declare all its entities within the std namespace.
Unit-1 1
, using namespace std;
Objects
Instance of a class. Basic run time entities in OOP.
Class
A class can be defined as an entity in which data and functions are put together.
Data Members
The data members are the variables that are declared within the class along with the
data types. The access specifiers to these members can be private, public or protected.
Methods and Messages
The functions of a class are called methods.
Message Passing
Mechanism which allows the objects to interact with each other. Its process is given as
follows:
1. Define the class with data members and member functions.
2. Create the objects belonging to the class
3. Establish communication between these objects using the methods.
Data Encapsulation
It means binding of data and method together in a single entity called class. The data
inside the class is accessible by the methods in the same class.
Data Abstraction and Information Hiding
Representation of only essential features by hiding all the implementation details. Data
that is declared as private then only member functions of the class can access it. This is
called data hiding.
Unit-1 2