Basic Concept of Object Oriented
Programming Language
Presented By:
Ms. Amritpal Kaur
Objects
Classes
Data Abstraction
Data Encapsulation
Data Hiding
Inheritance
Polymorphism
Binding
Message Passing
Course Outline
Objects are instance of a class, that interact with each
other at runtime. An object is an entity that has state,
behavior and identity. There are many objects around us.
E.g. A computer mouse is an object. Its states would be
its color, size and brand name and its behavior would be
left-click, right-click.
Objects
Class is a collection of similar objects or objects of same
type. Class is a way to bind the data and its associate
functions together. In the OOPs concept the variables
declared inside a class are known as "Data Members"
and the functions are known as "Member Functions".
By default all the elements of a class are private.
E.g. mango, apple and orange are members of class fruit.
Classes
There are three types of access specifiers are :
Private: The members declared as "private" can be
accessed only within the same class and not from
outside the class.
Public: The members declared as "public" are accessible
within the class as well as from outside the class.
Protected: The members declared as "protected" cannot
be accessed from outside the class, but can be accessed
from a derived class. This is used when inheritance is
applied to the members of a class.
Access Specifiers
Data Abstraction refers to the act of representing
essential features without including background details.
It is concerned with separating the behavior of a data
object from its representation.
E.g. Executable file of a program.
Data Abstraction
The process of binding the data members and functions
in a class is known as Data Encapsulation. By using
this concept data is not accessible to the outside world
and can access only those functions that are declared in
class.
Data Encapsulation
Data Hiding is the mechanism where details of the class
are hidden from the user. The user can perform only a
restricted set of operations in the hidden member of the
class. Data Hiding is similar to Data Encapsulation.
Data Hiding
Inheritance is a method by which new classes are
created from the existing classes. It inherits the
properties of base class into derived class.
Advantage is reusability of the code.
: symbol is used for inheriting a class.
Inheritance
Derived Class Visibility
Base Class
Visibility
Public
derivation
Private
derivation
Protected
derivation
Private Not inherited Not inherited Not inherited
Protected Protected Private Protected
Public Public Private Protected
The following table lists the visibility of the
base class members in the derived classes
Single Level Inheritance
Multiple Inheritance
Multilevel Inheritance
Hierarchical Inheritance
Hybrid Inheritance
Different types of inheritance in C++.
Polymorphism means ability to take more than one
form.
The process of making an operator to show different
behaviors in different instances is known as operator
overloading.
Using a single function name to perform different type
of task is known as function overloading.
Polymorphism
Binding refers to the linking of a procedure call to the
code to be executed in response to the call. There are
two types of binding:
Static Binding
Dynamic Binding
Binding
An Object Oriented program consists of a set of objects
that communicate with each other by sending and
receiving information much the same way as people
send messages to one another.
Message Passing
The message passing process involve
the following three steps:
Creating classes that define object and their behavior.
Creating objects from class definitions.
Establishing communication among objects.
Thanks

Oop

  • 1.
    Basic Concept ofObject Oriented Programming Language Presented By: Ms. Amritpal Kaur
  • 2.
    Objects Classes Data Abstraction Data Encapsulation DataHiding Inheritance Polymorphism Binding Message Passing Course Outline
  • 3.
    Objects are instanceof a class, that interact with each other at runtime. An object is an entity that has state, behavior and identity. There are many objects around us. E.g. A computer mouse is an object. Its states would be its color, size and brand name and its behavior would be left-click, right-click. Objects
  • 4.
    Class is acollection of similar objects or objects of same type. Class is a way to bind the data and its associate functions together. In the OOPs concept the variables declared inside a class are known as "Data Members" and the functions are known as "Member Functions". By default all the elements of a class are private. E.g. mango, apple and orange are members of class fruit. Classes
  • 5.
    There are threetypes of access specifiers are : Private: The members declared as "private" can be accessed only within the same class and not from outside the class. Public: The members declared as "public" are accessible within the class as well as from outside the class. Protected: The members declared as "protected" cannot be accessed from outside the class, but can be accessed from a derived class. This is used when inheritance is applied to the members of a class. Access Specifiers
  • 6.
    Data Abstraction refersto the act of representing essential features without including background details. It is concerned with separating the behavior of a data object from its representation. E.g. Executable file of a program. Data Abstraction
  • 7.
    The process ofbinding the data members and functions in a class is known as Data Encapsulation. By using this concept data is not accessible to the outside world and can access only those functions that are declared in class. Data Encapsulation
  • 8.
    Data Hiding isthe mechanism where details of the class are hidden from the user. The user can perform only a restricted set of operations in the hidden member of the class. Data Hiding is similar to Data Encapsulation. Data Hiding
  • 9.
    Inheritance is amethod by which new classes are created from the existing classes. It inherits the properties of base class into derived class. Advantage is reusability of the code. : symbol is used for inheriting a class. Inheritance
  • 10.
    Derived Class Visibility BaseClass Visibility Public derivation Private derivation Protected derivation Private Not inherited Not inherited Not inherited Protected Protected Private Protected Public Public Private Protected The following table lists the visibility of the base class members in the derived classes
  • 11.
    Single Level Inheritance MultipleInheritance Multilevel Inheritance Hierarchical Inheritance Hybrid Inheritance Different types of inheritance in C++.
  • 12.
    Polymorphism means abilityto take more than one form. The process of making an operator to show different behaviors in different instances is known as operator overloading. Using a single function name to perform different type of task is known as function overloading. Polymorphism
  • 13.
    Binding refers tothe linking of a procedure call to the code to be executed in response to the call. There are two types of binding: Static Binding Dynamic Binding Binding
  • 14.
    An Object Orientedprogram consists of a set of objects that communicate with each other by sending and receiving information much the same way as people send messages to one another. Message Passing
  • 15.
    The message passingprocess involve the following three steps: Creating classes that define object and their behavior. Creating objects from class definitions. Establishing communication among objects.
  • 16.