SlideShare a Scribd company logo
Object oriented
programing concept
Saurabh Upadhyay
OOP’s Concept
What is OOP’s Concept?
• OOPS is abbreviated as Object Oriented Programming system in
which programs are considered as a collection of objects. Each
object is nothing but an instance of a class.
• The popular object-oriented languages
are Java, C#, PHP, Python, C++, etc.
• Simula is considered the first object-oriented programming
language. The programming paradigm where everything is
represented as an object is known as a truly object-oriented
programming language.
Types of OOP’s Concept.
• Object means a real-world entity such as a pen, chair, table, computer, watch,
etc. Object-Oriented Programming is a methodology or paradigm to design a
program using classes and objects. It simplifies software development and
maintenance by providing some concepts:
• Object
• Class
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
Core Concept of OOP’s.
• The core concepts of OOPS are as below:
• Encapsulation
• Polymorphism
• Inheritance
• Abstraction
• Composition
• Association
• Aggregation
Understand By Diagram.
There are some other terms which are used
in Object-Oriented design:
• Coupling
• Cohesion
• Association
• Aggregation
• Composition
What is Object ?
• Any entity that has state and behavior is known as an object. For
example, a chair, pen, table, keyboard, bike, etc. It can be
physical or logical.
• An Object can be defined as an instance of a class. An object
contains an address and takes up some space in memory. Objects
can communicate without knowing the details of each other's data
or code. The only necessary thing is the type of message accepted
and the type of response returned by the objects.
• Example: A dog is an object because it has states like color, name,
breed, etc. as well as behaviors like wagging the tail, barking,
eating, etc.
Object Diagram.
What is Class ?
Collection of objects is called class. It is a logical entity.
• A class can also be defined as a blueprint from which you can
create an individual object. Class doesn't consume any space.
Polymorphism
• If one task is performed in different ways, it is known as polymorphism. For
example: to convince the customer differently, to draw something, for
example, shape, triangle, rectangle, etc.
• In Java, we use method overloading and method overriding to achieve
polymorphism.
• Another example can be to speak something; for example, a cat speaks meow,
dog barks woof, etc.
Abstraction:
• Hiding internal details and showing functionality is known as
abstraction. For example phone call, we don't know the internal
processing.
• In Java, we use abstract class and interface to achieve
abstraction.
Encapsulation
• Binding (or wrapping) code and data together into a single unit
are known as encapsulation. For example, a capsule, it is wrapped
with different medicines.
• A java class is the example of encapsulation. Java bean is the fully
encapsulated class because all the data members are private
here.
Coupling
• Coupling refers to the knowledge or information or dependency of
another class. It arises when classes are aware of each other. If a
class has the details information of another class, there is strong
coupling. In Java, we use private, protected, and public modifiers
to display the visibility level of a class, method, and field. You can
use interfaces for the weaker coupling because there is no
concrete implementation.
Cohesion
• Cohesion refers to the level of a component which performs a
single well-defined task. A single well-defined task is done by a
highly cohesive method. The weakly cohesive method will split the
task into separate parts. The java.io package is a highly cohesive
package because it has I/O related classes and interface.
However, the java.util package is a weakly cohesive package
because it has unrelated classes and interfaces.
Association
• Association represents the relationship between the objects. Here, one object
can be associated with one object or many objects. There can be four types of
association between the objects:
• One to One
• One to Many
• Many to One, and
• Many to Many
• Let's understand the relationship with real-time examples. For example, One
country can have one prime minister (one to one), and a prime minister can
have many ministers (one to many). Also, many MP's can have one prime
minister (many to one), and many ministers can have many departments (many
to many).
• Association can be unidirectional or bidirectional.
Aggregation
• Aggregation is a way to achieve Association. Aggregation
represents the relationship where one object contains other
objects as a part of its state. It represents the weak relationship
between objects. It is also termed as a has-a relationship in Java.
Like, inheritance represents the is-a relationship. It is another
way to reuse objects.
Composition
• The composition is also a way to achieve Association. The
composition represents the relationship where one object contains
other objects as a part of its state. There is a strong relationship
between the containing object and the dependent object. It is the
state where containing objects do not have an independent
existence. If you delete the parent object, all the child objects
will be deleted automatically.
Saurabh Upadhyay
THANK YOU!!

More Related Content

What's hot

itft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in javaitft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in java
Atul Sehdev
 
OOP
OOPOOP
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming Concepts
Kwangshin Oh
 
Oop concepts classes_objects
Oop concepts classes_objectsOop concepts classes_objects
Oop concepts classes_objects
William Olivier
 
Oops
OopsOops
Oops
Prabhu R
 
Introduction to oop with c++
Introduction to oop with c++Introduction to oop with c++
Introduction to oop with c++
Shruti Patel
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
Sachin Sharma
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
Ajay Chimmani
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
Ahmed Farag
 
Ah java-ppt2
Ah java-ppt2Ah java-ppt2
Ah java-ppt2
Haja Abdul Khader A
 
Oo ps concepts in c++
Oo ps concepts in c++Oo ps concepts in c++
Oo ps concepts in c++
Hemant Saini
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programmingAbzetdin Adamov
 
Oop ppt
Oop pptOop ppt
Oop ppt
Shani Manjara
 
Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4
MOHIT TOMAR
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 

What's hot (20)

Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
itft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in javaitft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in java
 
OOP
OOPOOP
OOP
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming Concepts
 
Oop concepts classes_objects
Oop concepts classes_objectsOop concepts classes_objects
Oop concepts classes_objects
 
OOPS Characteristics
OOPS CharacteristicsOOPS Characteristics
OOPS Characteristics
 
Oops
OopsOops
Oops
 
Introduction to oop with c++
Introduction to oop with c++Introduction to oop with c++
Introduction to oop with c++
 
General oops concepts
General oops conceptsGeneral oops concepts
General oops concepts
 
Java
JavaJava
Java
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
Ah java-ppt2
Ah java-ppt2Ah java-ppt2
Ah java-ppt2
 
Oo ps concepts in c++
Oo ps concepts in c++Oo ps concepts in c++
Oo ps concepts in c++
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
 
Oops
OopsOops
Oops
 
Oop ppt
Oop pptOop ppt
Oop ppt
 
Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
 

Similar to Object oriented programming concept- Saurabh Upadhyay

Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
Object-Oriented concepts.pptx
Object-Oriented concepts.pptxObject-Oriented concepts.pptx
Object-Oriented concepts.pptx
BHARATH KUMAR
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
Jessica Deakin
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
FredWauyo
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
KabitaParajuli3
 
java introduction features and propertie
java introduction features and propertiejava introduction features and propertie
java introduction features and propertie
SanaMateen7
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
130704798265658191
130704798265658191130704798265658191
130704798265658191
Tanzeel Ahmad
 
What is oops concept in java?
What is oops concept in java?What is oops concept in java?
What is oops concept in java?
kanchanmahajan23
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
Skillwise Group
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
LakshyaChauhan21
 
Introduction
IntroductionIntroduction
Introduction
Preeti Mishra
 
ITFT - Oops
ITFT - OopsITFT - Oops
ITFT - Oops
Blossom Sood
 
JAVA - Oops Concept.pptx
JAVA - Oops Concept.pptxJAVA - Oops Concept.pptx
JAVA - Oops Concept.pptx
ayankamila005
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
AnsgarMary
 
Presentation on oo ps 2
Presentation on oo ps 2Presentation on oo ps 2
Presentation on oo ps 2Avinash Kumar
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Sandeep Karthikeyan
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
madan r
 

Similar to Object oriented programming concept- Saurabh Upadhyay (20)

Intro to oop.pptx
Intro to oop.pptxIntro to oop.pptx
Intro to oop.pptx
 
Object-Oriented concepts.pptx
Object-Oriented concepts.pptxObject-Oriented concepts.pptx
Object-Oriented concepts.pptx
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
 
java introduction features and propertie
java introduction features and propertiejava introduction features and propertie
java introduction features and propertie
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
 
130704798265658191
130704798265658191130704798265658191
130704798265658191
 
What is oops concept in java?
What is oops concept in java?What is oops concept in java?
What is oops concept in java?
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
Introduction
IntroductionIntroduction
Introduction
 
ITFT - Oops
ITFT - OopsITFT - Oops
ITFT - Oops
 
JAVA - Oops Concept.pptx
JAVA - Oops Concept.pptxJAVA - Oops Concept.pptx
JAVA - Oops Concept.pptx
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
 
Presentation on oo ps 2
Presentation on oo ps 2Presentation on oo ps 2
Presentation on oo ps 2
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
 

More from Saurabh Upadhyay

TCS iON Certification
TCS iON CertificationTCS iON Certification
TCS iON Certification
Saurabh Upadhyay
 
Unix/Linux
Unix/Linux Unix/Linux
Unix/Linux
Saurabh Upadhyay
 
Rich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon Lechter
Rich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon LechterRich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon Lechter
Rich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon Lechter
Saurabh Upadhyay
 
What is java?-Saurabh Upadhyay
What is java?-Saurabh UpadhyayWhat is java?-Saurabh Upadhyay
What is java?-Saurabh Upadhyay
Saurabh Upadhyay
 
GT C Tour 2018 Highlights
GT C Tour 2018 HighlightsGT C Tour 2018 Highlights
GT C Tour 2018 Highlights
Saurabh Upadhyay
 
Artificial Intelligence VS Machine Learning
Artificial Intelligence VS Machine LearningArtificial Intelligence VS Machine Learning
Artificial Intelligence VS Machine Learning
Saurabh Upadhyay
 
Structured Query Language -SQL
Structured Query Language -SQLStructured Query Language -SQL
Structured Query Language -SQL
Saurabh Upadhyay
 

More from Saurabh Upadhyay (7)

TCS iON Certification
TCS iON CertificationTCS iON Certification
TCS iON Certification
 
Unix/Linux
Unix/Linux Unix/Linux
Unix/Linux
 
Rich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon Lechter
Rich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon LechterRich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon Lechter
Rich Dad Poor Dad Full E-book- Robert Kiyosaki and Sharon Lechter
 
What is java?-Saurabh Upadhyay
What is java?-Saurabh UpadhyayWhat is java?-Saurabh Upadhyay
What is java?-Saurabh Upadhyay
 
GT C Tour 2018 Highlights
GT C Tour 2018 HighlightsGT C Tour 2018 Highlights
GT C Tour 2018 Highlights
 
Artificial Intelligence VS Machine Learning
Artificial Intelligence VS Machine LearningArtificial Intelligence VS Machine Learning
Artificial Intelligence VS Machine Learning
 
Structured Query Language -SQL
Structured Query Language -SQLStructured Query Language -SQL
Structured Query Language -SQL
 

Recently uploaded

Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 

Recently uploaded (20)

Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 

Object oriented programming concept- Saurabh Upadhyay

  • 2. What is OOP’s Concept? • OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class. • The popular object-oriented languages are Java, C#, PHP, Python, C++, etc. • Simula is considered the first object-oriented programming language. The programming paradigm where everything is represented as an object is known as a truly object-oriented programming language.
  • 3. Types of OOP’s Concept. • Object means a real-world entity such as a pen, chair, table, computer, watch, etc. Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies software development and maintenance by providing some concepts: • Object • Class • Inheritance • Polymorphism • Abstraction • Encapsulation
  • 4. Core Concept of OOP’s. • The core concepts of OOPS are as below: • Encapsulation • Polymorphism • Inheritance • Abstraction • Composition • Association • Aggregation
  • 6. There are some other terms which are used in Object-Oriented design: • Coupling • Cohesion • Association • Aggregation • Composition
  • 7. What is Object ? • Any entity that has state and behavior is known as an object. For example, a chair, pen, table, keyboard, bike, etc. It can be physical or logical. • An Object can be defined as an instance of a class. An object contains an address and takes up some space in memory. Objects can communicate without knowing the details of each other's data or code. The only necessary thing is the type of message accepted and the type of response returned by the objects. • Example: A dog is an object because it has states like color, name, breed, etc. as well as behaviors like wagging the tail, barking, eating, etc.
  • 9. What is Class ? Collection of objects is called class. It is a logical entity. • A class can also be defined as a blueprint from which you can create an individual object. Class doesn't consume any space.
  • 10. Polymorphism • If one task is performed in different ways, it is known as polymorphism. For example: to convince the customer differently, to draw something, for example, shape, triangle, rectangle, etc. • In Java, we use method overloading and method overriding to achieve polymorphism. • Another example can be to speak something; for example, a cat speaks meow, dog barks woof, etc.
  • 11. Abstraction: • Hiding internal details and showing functionality is known as abstraction. For example phone call, we don't know the internal processing. • In Java, we use abstract class and interface to achieve abstraction.
  • 12. Encapsulation • Binding (or wrapping) code and data together into a single unit are known as encapsulation. For example, a capsule, it is wrapped with different medicines. • A java class is the example of encapsulation. Java bean is the fully encapsulated class because all the data members are private here.
  • 13. Coupling • Coupling refers to the knowledge or information or dependency of another class. It arises when classes are aware of each other. If a class has the details information of another class, there is strong coupling. In Java, we use private, protected, and public modifiers to display the visibility level of a class, method, and field. You can use interfaces for the weaker coupling because there is no concrete implementation.
  • 14. Cohesion • Cohesion refers to the level of a component which performs a single well-defined task. A single well-defined task is done by a highly cohesive method. The weakly cohesive method will split the task into separate parts. The java.io package is a highly cohesive package because it has I/O related classes and interface. However, the java.util package is a weakly cohesive package because it has unrelated classes and interfaces.
  • 15. Association • Association represents the relationship between the objects. Here, one object can be associated with one object or many objects. There can be four types of association between the objects: • One to One • One to Many • Many to One, and • Many to Many • Let's understand the relationship with real-time examples. For example, One country can have one prime minister (one to one), and a prime minister can have many ministers (one to many). Also, many MP's can have one prime minister (many to one), and many ministers can have many departments (many to many). • Association can be unidirectional or bidirectional.
  • 16. Aggregation • Aggregation is a way to achieve Association. Aggregation represents the relationship where one object contains other objects as a part of its state. It represents the weak relationship between objects. It is also termed as a has-a relationship in Java. Like, inheritance represents the is-a relationship. It is another way to reuse objects.
  • 17. Composition • The composition is also a way to achieve Association. The composition represents the relationship where one object contains other objects as a part of its state. There is a strong relationship between the containing object and the dependent object. It is the state where containing objects do not have an independent existence. If you delete the parent object, all the child objects will be deleted automatically.