SlideShare a Scribd company logo
1 of 6
Student of software engineering at
International Islamic university Islamabad
Pakistan.
Second semester .
Email
shafiqkhuidad@gmail.com
shafiqkhuidad@yahoo.com
shafiqkhuidad@oultook.com
shafiqkhuidad@engineer.com
 Every language that support three
components are called Object oriented
language
1. Class
2. Object
3. Inheritance
 Now question is that why we use OOP?
 Answer is simple that just for Reuse ability
,and extension and enhancement .
 Example of reuse ability is CIN object.
 You can create cin like objects using oop
concepts.
 Class: class is basically user define data type.
 Class //key word
 {
 Data member;//may be int ,float ,etc or
function
 };
 By default the access restriction on data member
of classes is private .
 We can make data access restriction by using
public keyword .
 Difference b/w structure and class
 By default access specification of data member of
class is private while that of structure is public .
 We use class in programming due to the reason that
we solve problems of real world using programming
,and all things in universe lies in classes e.g. human
being lies in classes and each human is object of
human class , each human object has its own
attributes(properties ) and functionalities.
 Like human born ,perform its functionalities and die
,the same way object is created ,perform
functionalities and then destroy.
 When object is created its attributes get space in
memory .
 Every object has its own life cycle.
 Example of class name student
Class
{
char name;
int id;
float cgpa;
Public :
void getdata()
{
cin>>name>>id>>cgpa;
}
void showdata()
{
cout<<name<<endl<<id<<endl<<cgpa<<endl;
}
};
 Class :
 There are two uses/properties/functionalities of
class
a. Encapsulation of data
b. Data hiding
 When we write attributes and functionalities
inside class body that’s called encapsulation.
 Data hiding means restriction on data access.
 We use three key word
1. Private
2. Public
3. Protected

More Related Content

What's hot

Friend function
Friend functionFriend function
Friend functionHeet Patel
 
Access modifiers
Access modifiersAccess modifiers
Access modifiersJadavsejal
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP IntroductionHashni T
 
Understanding class, object & interface
Understanding class, object & interfaceUnderstanding class, object & interface
Understanding class, object & interfaceMD. Shohag Mia
 
Primary Key & Foreign Key part10
Primary Key & Foreign Key part10Primary Key & Foreign Key part10
Primary Key & Foreign Key part10DrMohammed Qassim
 
Oops presentation java
Oops presentation javaOops presentation java
Oops presentation javaJayasankarPR2
 
Named Entity Recognition for Telugu Using Conditional Random Field
Named Entity Recognition for Telugu Using Conditional Random FieldNamed Entity Recognition for Telugu Using Conditional Random Field
Named Entity Recognition for Telugu Using Conditional Random FieldWaqas Tariq
 
Introduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IXIntroduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IXAnsh Sam
 
Class properties
Class propertiesClass properties
Class propertiesSiva Priya
 
Multiple Inheritance
Multiple InheritanceMultiple Inheritance
Multiple Inheritanceadil raja
 
Named Entity Recognition System for Hindi Language: A Hybrid Approach
Named Entity Recognition System for Hindi Language: A Hybrid ApproachNamed Entity Recognition System for Hindi Language: A Hybrid Approach
Named Entity Recognition System for Hindi Language: A Hybrid ApproachWaqas Tariq
 
Inner classnotation in uml class diagram
Inner classnotation in uml class diagramInner classnotation in uml class diagram
Inner classnotation in uml class diagramIIUM
 
Data types in Java
Data types in JavaData types in Java
Data types in JavaPlay Store
 
A Dialogue System for Telugu, a Resource-Poor Language
A Dialogue System for Telugu, a Resource-Poor LanguageA Dialogue System for Telugu, a Resource-Poor Language
A Dialogue System for Telugu, a Resource-Poor LanguageSravanthi Mullapudi
 

What's hot (20)

Friend function
Friend functionFriend function
Friend function
 
[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers
 
Access modifiers
Access modifiersAccess modifiers
Access modifiers
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP Introduction
 
Understanding class, object & interface
Understanding class, object & interfaceUnderstanding class, object & interface
Understanding class, object & interface
 
Primary Key & Foreign Key part10
Primary Key & Foreign Key part10Primary Key & Foreign Key part10
Primary Key & Foreign Key part10
 
Inheritance
InheritanceInheritance
Inheritance
 
Oops presentation java
Oops presentation javaOops presentation java
Oops presentation java
 
Tutorial 4
Tutorial 4Tutorial 4
Tutorial 4
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
Named Entity Recognition for Telugu Using Conditional Random Field
Named Entity Recognition for Telugu Using Conditional Random FieldNamed Entity Recognition for Telugu Using Conditional Random Field
Named Entity Recognition for Telugu Using Conditional Random Field
 
Data types IN JAVA
Data types IN JAVAData types IN JAVA
Data types IN JAVA
 
Introduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IXIntroduction to Object Oriented Programming Class IX
Introduction to Object Oriented Programming Class IX
 
Class properties
Class propertiesClass properties
Class properties
 
Multiple Inheritance
Multiple InheritanceMultiple Inheritance
Multiple Inheritance
 
Named Entity Recognition System for Hindi Language: A Hybrid Approach
Named Entity Recognition System for Hindi Language: A Hybrid ApproachNamed Entity Recognition System for Hindi Language: A Hybrid Approach
Named Entity Recognition System for Hindi Language: A Hybrid Approach
 
Inner classnotation in uml class diagram
Inner classnotation in uml class diagramInner classnotation in uml class diagram
Inner classnotation in uml class diagram
 
C# concepts
C# conceptsC# concepts
C# concepts
 
Data types in Java
Data types in JavaData types in Java
Data types in Java
 
A Dialogue System for Telugu, a Resource-Poor Language
A Dialogue System for Telugu, a Resource-Poor LanguageA Dialogue System for Telugu, a Resource-Poor Language
A Dialogue System for Telugu, a Resource-Poor Language
 

Viewers also liked

Introductory interaction
Introductory interactionIntroductory interaction
Introductory interactionSujithran P
 
Curriculum vitae Leon Oosterik- English
Curriculum vitae Leon Oosterik- EnglishCurriculum vitae Leon Oosterik- English
Curriculum vitae Leon Oosterik- EnglishLeon Oosterik
 
Lynne Robinson CV-2014
Lynne Robinson CV-2014Lynne Robinson CV-2014
Lynne Robinson CV-2014Lynne Robinson
 
Light Activated Conjugated Polymer tutorial review
Light Activated Conjugated Polymer tutorial reviewLight Activated Conjugated Polymer tutorial review
Light Activated Conjugated Polymer tutorial reviewDavid McMillan
 
PROFESSIONAL LITRATURE
PROFESSIONAL LITRATUREPROFESSIONAL LITRATURE
PROFESSIONAL LITRATURESujithran P
 
Introductory Interaction
Introductory InteractionIntroductory Interaction
Introductory InteractionSujithran P
 
CONTINUING PROFESSIONAL DEVELOPMENT
CONTINUING PROFESSIONAL DEVELOPMENTCONTINUING PROFESSIONAL DEVELOPMENT
CONTINUING PROFESSIONAL DEVELOPMENTSujithran P
 
2017 WRoCAH AHRC Competition applications (optimized)
2017 WRoCAH AHRC Competition applications (optimized)2017 WRoCAH AHRC Competition applications (optimized)
2017 WRoCAH AHRC Competition applications (optimized)Caryn Douglas
 

Viewers also liked (12)

Prep Smarter!
Prep Smarter!Prep Smarter!
Prep Smarter!
 
Introductory interaction
Introductory interactionIntroductory interaction
Introductory interaction
 
Curriculum vitae Leon Oosterik- English
Curriculum vitae Leon Oosterik- EnglishCurriculum vitae Leon Oosterik- English
Curriculum vitae Leon Oosterik- English
 
Lynne Robinson CV-2014
Lynne Robinson CV-2014Lynne Robinson CV-2014
Lynne Robinson CV-2014
 
Light Activated Conjugated Polymer tutorial review
Light Activated Conjugated Polymer tutorial reviewLight Activated Conjugated Polymer tutorial review
Light Activated Conjugated Polymer tutorial review
 
MANUAL DE IDENTIDAD
MANUAL DE IDENTIDADMANUAL DE IDENTIDAD
MANUAL DE IDENTIDAD
 
JPJgwhTD102404
JPJgwhTD102404JPJgwhTD102404
JPJgwhTD102404
 
PROFESSIONAL LITRATURE
PROFESSIONAL LITRATUREPROFESSIONAL LITRATURE
PROFESSIONAL LITRATURE
 
Introductory Interaction
Introductory InteractionIntroductory Interaction
Introductory Interaction
 
CONTINUING PROFESSIONAL DEVELOPMENT
CONTINUING PROFESSIONAL DEVELOPMENTCONTINUING PROFESSIONAL DEVELOPMENT
CONTINUING PROFESSIONAL DEVELOPMENT
 
2017 WRoCAH AHRC Competition applications (optimized)
2017 WRoCAH AHRC Competition applications (optimized)2017 WRoCAH AHRC Competition applications (optimized)
2017 WRoCAH AHRC Competition applications (optimized)
 
RELACIONES PUBLICAS
RELACIONES PUBLICASRELACIONES PUBLICAS
RELACIONES PUBLICAS
 

Similar to Oop

Similar to Oop (20)

Object oriented vs. object based programming
Object oriented vs. object based  programmingObject oriented vs. object based  programming
Object oriented vs. object based programming
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developers
 
Python-Classes.pptx
Python-Classes.pptxPython-Classes.pptx
Python-Classes.pptx
 
Oops
OopsOops
Oops
 
Unit-V.pptx
Unit-V.pptxUnit-V.pptx
Unit-V.pptx
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
 
OOP in Java Presentation.pptx
OOP in Java Presentation.pptxOOP in Java Presentation.pptx
OOP in Java Presentation.pptx
 
c++session 1.pptx
c++session 1.pptxc++session 1.pptx
c++session 1.pptx
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
130704798265658191
130704798265658191130704798265658191
130704798265658191
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
oopm 2.pdf
oopm 2.pdfoopm 2.pdf
oopm 2.pdf
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
OOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and ObjectOOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and Object
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
javaopps concepts
javaopps conceptsjavaopps concepts
javaopps concepts
 
Object oriented programming C++
Object oriented programming C++Object oriented programming C++
Object oriented programming C++
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
CS3391 -OOP -UNIT – I NOTES FINAL.pdf
CS3391 -OOP -UNIT – I  NOTES FINAL.pdfCS3391 -OOP -UNIT – I  NOTES FINAL.pdf
CS3391 -OOP -UNIT – I NOTES FINAL.pdf
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 

Recently uploaded

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 

Recently uploaded (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 

Oop

  • 1. Student of software engineering at International Islamic university Islamabad Pakistan. Second semester . Email shafiqkhuidad@gmail.com shafiqkhuidad@yahoo.com shafiqkhuidad@oultook.com shafiqkhuidad@engineer.com
  • 2.  Every language that support three components are called Object oriented language 1. Class 2. Object 3. Inheritance  Now question is that why we use OOP?  Answer is simple that just for Reuse ability ,and extension and enhancement .
  • 3.  Example of reuse ability is CIN object.  You can create cin like objects using oop concepts.  Class: class is basically user define data type.  Class //key word  {  Data member;//may be int ,float ,etc or function  };  By default the access restriction on data member of classes is private .  We can make data access restriction by using public keyword .
  • 4.  Difference b/w structure and class  By default access specification of data member of class is private while that of structure is public .  We use class in programming due to the reason that we solve problems of real world using programming ,and all things in universe lies in classes e.g. human being lies in classes and each human is object of human class , each human object has its own attributes(properties ) and functionalities.  Like human born ,perform its functionalities and die ,the same way object is created ,perform functionalities and then destroy.  When object is created its attributes get space in memory .  Every object has its own life cycle.
  • 5.  Example of class name student Class { char name; int id; float cgpa; Public : void getdata() { cin>>name>>id>>cgpa; } void showdata() { cout<<name<<endl<<id<<endl<<cgpa<<endl; } };
  • 6.  Class :  There are two uses/properties/functionalities of class a. Encapsulation of data b. Data hiding  When we write attributes and functionalities inside class body that’s called encapsulation.  Data hiding means restriction on data access.  We use three key word 1. Private 2. Public 3. Protected