SlideShare a Scribd company logo
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 1
Mr. Aditya Tandon
8750006999
aditya.tandon@krishnacollege.ac.in
CSE III Year
Object Oriented
Programming with C++
Module-1
Concepts of
OOP
www.krishnacollege.ac.in
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 2
Concepts of OOP
• Introduction to OOP
• Procedural Vs. Object Oriented Programming
• Principles of OOP
• Benefits and applications of OOP
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 3
Introduction to OOP
 OOP is a design philosophy. It stands for Object Oriented
Programming.
 C++ was founded in (1983)
Bjarne Stroustrup
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 4
Introduction to OOP
 Object-Oriented Programming (OOP) uses a different set of
programming languages than old procedural programming
languages like (C, Pascal, etc.).
 Everything in OOP is grouped as self sustainable "objects".
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 5
What is Object?
Pen Board Laptop
Bench Student Projector
Physical objects…
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 6
What is Object?
Logical objects…
Result Account
Bank Account
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 7
Attributes and operations
Attributes:
Name
Age
Weight
Operations:
Eat
Sleep
Walk
Attributes:
Company
Model
Weight
Operations:
Drive
Stop
FillFuel
Attributes:
AccountNo
HolderName
Balance
Operations:
Deposit
Withdraw
Transfer
Write down 5 objects with their attributes and operations
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 8
What is Object ?
Properties (Describe)
Manufacturer
Model
Color
Year
Price
Methods (Actions)
Start
Drive
Park
Events
On_Start
On_Parked
On_Brake
OBJECT: CAR
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 9
Classes…
Class: Blueprint (template) for object.
Object: Instance of class.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 10
Class
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 11
Applications of OOP
 Real Time Systems Design
 Simulation and Modeling System
 Object Oriented Database
 Client-Server System
 Neural Networking and Parallel Programming
 Decision Support and Office Automation Systems
 CIM/CAD/CAM Systems
 AI and Expert Systems
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 12
Procedural Vs. Object Oriented Programming
POP OOP
Emphasis is on doing things not on
data, means it is function driven
Emphasis is on data rather than
procedure, means object driven
Main focus is on the function and
procedures that operate on data
Main focus is on the data that is
being operated
Top Down approach in program
design
Bottom Up approach in program
design
Large programs are divided into
smaller programs known as
functions
Large programs are divided into
classes and objects
Most of the functions share global
data
Data is tied together with function in
the data structure
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 13
Procedural Vs. Object Oriented Programming
Data moves openly in the system
from one function to another
function
Data is hidden and cannot be
accessed by external functions
POP OOP
Adding of data and function is
difficult
Adding of data and function is easy
We cannot declare namespace
directly
We can use name space directly,
Ex: using namespace std;
Concepts like inheritance,
polymorphism, data encapsulation,
abstraction, access specifiers are not
available.
Concepts like inheritance,
polymorphism, data encapsulation,
abstraction, access specifiers are
available and can be used easily
Examples: C, Fortran, Pascal, etc… Examples: C++, Java, C#, etc…
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 14
Principles of OOP (A.E.I.P)
 There are mainly four OOP Principles
Abstraction
Encapsulation
Inheritance
Polymorphism
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 15
Abstraction
 Abstraction refers to the act of representing essential features
without including the background details or explanations.
 Abstraction provides you a generalized view of your classes or
object by providing relevant information.
 Abstraction is the process of hiding the working style of an object,
and showing the information of an object in understandable
manner.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 16
Abstraction Example
Nokia 1400
Features:
Nokia 2700
Features:
FM Radio
MP3
Camera
Blackberry
Features:
FM Radio
MP3
Camera
Video Recording
Reading E-mails
Abstract information (Necessary and
Common Information) for the object
“Mobile Phone” is make a call to any
number and can send SMS.”
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 17
Abstraction Example
 Example:
If somebody in your college tells you to fill application form,
you will fill your details like name, address, data of birth, which
semester, percentage you have got etc.
 If some doctor gives you an application to fill the details, you
will fill the details like name, address, date of birth, blood group,
height and weight.
 See in the above example what is the common thing?
Age, name, address so you can create the class which consist of
common thing that is called abstract class.
That class is not complete and it can inherit by other class.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 18
Encapsulation
 The wrapping up of data and functions into a single unit is known
as encapsulation
 The insulation of the data from direct access by the program is
called data hiding or information hiding.
 It is the process of enclosing one or more details from outside
world through access right.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 19
Encapsulation
• Abstraction is a process where you show
only “relevant” data and “hide”
unnecessary details of an object from the
user.
• Consider your mobile phone, you just
need to know what buttons are to be
pressed to send a message or make a call,
What happens when you press a button,
how your messages are sent, how your
calls are connected is all abstracted away
from the user.
• Encapsulation is the process of combining
data and functions into a single unit called
class. In Encapsulation, the data is not
accessed directly; it is accessed through
the functions present inside the class.
• Users are unaware about working of
circuitry and hardware devices.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 20
Abstraction Vs Encapsulation
 Abstraction says what details to be made visible & Encapsulation
provides the level of access right to that visible details.
Example:
 When we switch on the Bluetooth, we are able to connect another
mobile but unable to access the other mobile features like dialling
a number, accessing inbox etc. This is because, Bluetooth feature
is given some level of abstraction.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 21
Abstraction Vs Encapsulation
 When mobile A is connected with mobile B via Bluetooth whereas
mobile B is already connected to mobile C then A is not allowed to
connect C via B. This is because of accessibility restriction.
B
A
C
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 22
Inheritance
 Inheritance is the process by which objects of one class acquire
the properties of objects of another class.
 Here Vehicle class can have properties like Chassis no. , Engine,
Colour etc.
 All these properties inherited by sub classes of vehicle class.
Vehicle
Water
Land Air
Bus Car Ship Boat Aero plane Helicopter
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 23
Polymorphism
 Polymorphism means ability to take more than one form.
 For example the operation addition.
 For two numbers the operation will generate a sum.
 If the operands are strings, then the operation would produce a
third string by concatenation.
Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 24
Thank You

More Related Content

PPT
Basic concepts of object oriented programming
PDF
Object Oriented Programming Lecture Notes
PPT
Introduction to method overloading & method overriding in java hdm
PPT
Class and object in c++
PPTX
Java abstract class & abstract methods
PPTX
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
PPTX
Static Members-Java.pptx
PPTX
C# Framework class library
Basic concepts of object oriented programming
Object Oriented Programming Lecture Notes
Introduction to method overloading & method overriding in java hdm
Class and object in c++
Java abstract class & abstract methods
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
Static Members-Java.pptx
C# Framework class library

What's hot (20)

PPTX
Constructor in java
PPTX
PPTX
Inheritance In Java
PPTX
Abstraction in java.pptx
PPTX
Method overloading
PPTX
Object oriented programming concepts
PPTX
Oop c++class(final).ppt
PPTX
[OOP - Lec 08] Encapsulation (Information Hiding)
PPTX
Functions in c language
PPTX
Principal of objected oriented programming
ODP
OOP java
PPTX
concept of oops
PPTX
1 unit (oops)
PDF
Class and Objects in Java
PPTX
Advance oops concepts
PPTX
Object oriented programming
PPTX
classes and objects in C++
PPTX
Python-DataAbstarction.pptx
PPTX
OOPS In JAVA.pptx
Constructor in java
Inheritance In Java
Abstraction in java.pptx
Method overloading
Object oriented programming concepts
Oop c++class(final).ppt
[OOP - Lec 08] Encapsulation (Information Hiding)
Functions in c language
Principal of objected oriented programming
OOP java
concept of oops
1 unit (oops)
Class and Objects in Java
Advance oops concepts
Object oriented programming
classes and objects in C++
Python-DataAbstarction.pptx
OOPS In JAVA.pptx
Ad

Similar to OOPS with C++ | Concepts of OOPS | Introduction (20)

PDF
Concept of OOPs (Darshan Academy)Concept of OOPs (Darshan Academy).pdf.pdf
PPTX
Chapter 04 object oriented programming
PPTX
General oops concepts
PPTX
introduction of Object oriented programming
PDF
Object Oriented Programming With C 2140705 Darshan All Unit Darshan Institute...
PDF
L1-Introduction to OOPs concepts.pdf
PPT
Basic concept of OOP's
PPTX
Object oriented programming
PPTX
CPP-Unit 1.pptx
PPTX
Intro to oop.pptx
PDF
Computer_Programming_Part_II_Segment_01.pdf
PDF
Object-Oriented Programming (OOP)
DOC
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
PPTX
Object Oriented Programming Concepts Using C++
PDF
C++ & VISUAL C++
PPT
chapter - 1.ppt
PPT
Introduction.ppt JAVA SCRIPT PROGRAMMING AND
PPTX
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
PDF
1.3 Object Oriented Programming Paradigm, Basic Concepts of Object-Oriented P...
PDF
Progecad 2025 Professional Cracked [Latest]
Concept of OOPs (Darshan Academy)Concept of OOPs (Darshan Academy).pdf.pdf
Chapter 04 object oriented programming
General oops concepts
introduction of Object oriented programming
Object Oriented Programming With C 2140705 Darshan All Unit Darshan Institute...
L1-Introduction to OOPs concepts.pdf
Basic concept of OOP's
Object oriented programming
CPP-Unit 1.pptx
Intro to oop.pptx
Computer_Programming_Part_II_Segment_01.pdf
Object-Oriented Programming (OOP)
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
Object Oriented Programming Concepts Using C++
C++ & VISUAL C++
chapter - 1.ppt
Introduction.ppt JAVA SCRIPT PROGRAMMING AND
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
1.3 Object Oriented Programming Paradigm, Basic Concepts of Object-Oriented P...
Progecad 2025 Professional Cracked [Latest]
Ad

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Types and Its function , kingdom of life
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Lesson notes of climatology university.
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Basic Mud Logging Guide for educational purpose
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Classroom Observation Tools for Teachers
Cell Types and Its function , kingdom of life
Computing-Curriculum for Schools in Ghana
Lesson notes of climatology university.
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
O7-L3 Supply Chain Operations - ICLT Program
Module 4: Burden of Disease Tutorial Slides S2 2025
TR - Agricultural Crops Production NC III.pdf
Anesthesia in Laparoscopic Surgery in India
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Abdominal Access Techniques with Prof. Dr. R K Mishra
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Renaissance Architecture: A Journey from Faith to Humanism
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Basic Mud Logging Guide for educational purpose
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf

OOPS with C++ | Concepts of OOPS | Introduction

  • 1. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 1 Mr. Aditya Tandon 8750006999 [email protected] CSE III Year Object Oriented Programming with C++ Module-1 Concepts of OOP www.krishnacollege.ac.in
  • 2. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 2 Concepts of OOP • Introduction to OOP • Procedural Vs. Object Oriented Programming • Principles of OOP • Benefits and applications of OOP
  • 3. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 3 Introduction to OOP  OOP is a design philosophy. It stands for Object Oriented Programming.  C++ was founded in (1983) Bjarne Stroustrup
  • 4. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 4 Introduction to OOP  Object-Oriented Programming (OOP) uses a different set of programming languages than old procedural programming languages like (C, Pascal, etc.).  Everything in OOP is grouped as self sustainable "objects".
  • 5. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 5 What is Object? Pen Board Laptop Bench Student Projector Physical objects…
  • 6. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 6 What is Object? Logical objects… Result Account Bank Account
  • 7. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 7 Attributes and operations Attributes: Name Age Weight Operations: Eat Sleep Walk Attributes: Company Model Weight Operations: Drive Stop FillFuel Attributes: AccountNo HolderName Balance Operations: Deposit Withdraw Transfer Write down 5 objects with their attributes and operations
  • 8. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 8 What is Object ? Properties (Describe) Manufacturer Model Color Year Price Methods (Actions) Start Drive Park Events On_Start On_Parked On_Brake OBJECT: CAR
  • 9. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 9 Classes… Class: Blueprint (template) for object. Object: Instance of class.
  • 10. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 10 Class
  • 11. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 11 Applications of OOP  Real Time Systems Design  Simulation and Modeling System  Object Oriented Database  Client-Server System  Neural Networking and Parallel Programming  Decision Support and Office Automation Systems  CIM/CAD/CAM Systems  AI and Expert Systems
  • 12. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 12 Procedural Vs. Object Oriented Programming POP OOP Emphasis is on doing things not on data, means it is function driven Emphasis is on data rather than procedure, means object driven Main focus is on the function and procedures that operate on data Main focus is on the data that is being operated Top Down approach in program design Bottom Up approach in program design Large programs are divided into smaller programs known as functions Large programs are divided into classes and objects Most of the functions share global data Data is tied together with function in the data structure
  • 13. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 13 Procedural Vs. Object Oriented Programming Data moves openly in the system from one function to another function Data is hidden and cannot be accessed by external functions POP OOP Adding of data and function is difficult Adding of data and function is easy We cannot declare namespace directly We can use name space directly, Ex: using namespace std; Concepts like inheritance, polymorphism, data encapsulation, abstraction, access specifiers are not available. Concepts like inheritance, polymorphism, data encapsulation, abstraction, access specifiers are available and can be used easily Examples: C, Fortran, Pascal, etc… Examples: C++, Java, C#, etc…
  • 14. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 14 Principles of OOP (A.E.I.P)  There are mainly four OOP Principles Abstraction Encapsulation Inheritance Polymorphism
  • 15. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 15 Abstraction  Abstraction refers to the act of representing essential features without including the background details or explanations.  Abstraction provides you a generalized view of your classes or object by providing relevant information.  Abstraction is the process of hiding the working style of an object, and showing the information of an object in understandable manner.
  • 16. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 16 Abstraction Example Nokia 1400 Features: Nokia 2700 Features: FM Radio MP3 Camera Blackberry Features: FM Radio MP3 Camera Video Recording Reading E-mails Abstract information (Necessary and Common Information) for the object “Mobile Phone” is make a call to any number and can send SMS.”
  • 17. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 17 Abstraction Example  Example: If somebody in your college tells you to fill application form, you will fill your details like name, address, data of birth, which semester, percentage you have got etc.  If some doctor gives you an application to fill the details, you will fill the details like name, address, date of birth, blood group, height and weight.  See in the above example what is the common thing? Age, name, address so you can create the class which consist of common thing that is called abstract class. That class is not complete and it can inherit by other class.
  • 18. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 18 Encapsulation  The wrapping up of data and functions into a single unit is known as encapsulation  The insulation of the data from direct access by the program is called data hiding or information hiding.  It is the process of enclosing one or more details from outside world through access right.
  • 19. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 19 Encapsulation • Abstraction is a process where you show only “relevant” data and “hide” unnecessary details of an object from the user. • Consider your mobile phone, you just need to know what buttons are to be pressed to send a message or make a call, What happens when you press a button, how your messages are sent, how your calls are connected is all abstracted away from the user. • Encapsulation is the process of combining data and functions into a single unit called class. In Encapsulation, the data is not accessed directly; it is accessed through the functions present inside the class. • Users are unaware about working of circuitry and hardware devices.
  • 20. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 20 Abstraction Vs Encapsulation  Abstraction says what details to be made visible & Encapsulation provides the level of access right to that visible details. Example:  When we switch on the Bluetooth, we are able to connect another mobile but unable to access the other mobile features like dialling a number, accessing inbox etc. This is because, Bluetooth feature is given some level of abstraction.
  • 21. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 21 Abstraction Vs Encapsulation  When mobile A is connected with mobile B via Bluetooth whereas mobile B is already connected to mobile C then A is not allowed to connect C via B. This is because of accessibility restriction. B A C
  • 22. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 22 Inheritance  Inheritance is the process by which objects of one class acquire the properties of objects of another class.  Here Vehicle class can have properties like Chassis no. , Engine, Colour etc.  All these properties inherited by sub classes of vehicle class. Vehicle Water Land Air Bus Car Ship Boat Aero plane Helicopter
  • 23. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 23 Polymorphism  Polymorphism means ability to take more than one form.  For example the operation addition.  For two numbers the operation will generate a sum.  If the operands are strings, then the operation would produce a third string by concatenation.
  • 24. Module-1 Concepts of OOP Krishna Engineering College, Ghaziabad 24 Thank You

Editor's Notes

  • #9: Describe car Properties: Make, Model, Color, Year, Price Actions Start, Drive, Park Thing happens to a car Events On_Strart(Turn on head light),On_Parked, On_Brake These are backbone of object oriented programming
  • #17: Abstraction provides you a generalized view of your classes or object by providing relevant information. Abstraction is the process of hiding the working style of an object, and showing the information of an object in understandable manner. I am giving real life Example of Abstraction: Suppose you have an object Mobile Phone. Suppose you have 3 mobile phones as following Nokia 1400 (Features- Calling, SMS) Nokia 2700 (Features- Calling, SMS, FM Radio, MP3, Camera) Black Berry (Features- Calling, SMS, FM Radio, MP3, Camera, Video Recording, Reading E-mails) Abstract information (Necessary and Common Information) for the object “Mobile Phone” is make a call to any number and can send SMS.” so that, for mobile phone object you will have abstract class like following:- view source code Abstraction means putting all the variables and methods in a class which are necessary. For example: – Abstract class and abstract method. Abstraction is the common thing. Example: If somebody in your collage tell you to fill application form, you will fill your details like name, address, data of birth, which semester, percentage you have got etc. If some doctor gives you an application to fill the details, you will fill the details like name, address, date of birth, blood group, height and weight. See in the above example what is the common thing? Age, name, address so you can create the class which consist of common thing that