SlideShare une entreprise Scribd logo
1  sur  15
INTRODUCTION TO OBJECT-
ORIENTED PROGRAMMING
(OOP)
1
OOP CONCEPT
 Enable programmers to create modules that do not
need to be changed when a new type of object is
added.
 Programmer can simply create a new object that
inherits many of its features from existing objects
 Makes object-oriented programs easier to modify
2
HISTORY OF OOP
 Many people believe that OOP is a product of the
1980s (Bjarne Stroustrup).
 Actually, SIMULA 1 (1962) and Simula 67 (1967)
[earliest object-oriented languages]
 The work on the Simula languages (Ole-John Dahl
and Kristen Nygaard) at the Norwegian Computing
Center in Oslo, Norway.
 Most of the advantages of OOP available in the
earlier Simula languages, it wasn't until C++
became entrenched in the 1990s that OOP began
to flourish.
3
ADVANTAGES OF USING OOP
 OOP provides a clear modular structure for
programs which makes it good for
defining abstract data types where implementation
details are hidden and the unit has a clearly defined
interface.
 OOP makes it easy to maintain and modify existing
code as new objects can be created with small
differences to existing ones.
 OOP provides a good framework for code libraries
where supplied software components can be easily
adapted and modified by the programmer.
4
TERMINOLOGIES OF OOP
 Classes
 Object
 Encapsulation
 Data Abstraction
 Inheritance
 Polymorphism
5
CLASSES
 A collection of objects of a similar type.
 Once a class is defined, any number of objects can
be created which belong to that class.
 A class is a blueprint, or prototype, that defines the
variables and the methods common to all objects of
a certain kind.
6
OBJECT
 An instance of a class.
 A class must be instantiated into an object before it
can be used in the software.
 A software bundle of related state and behavior.
 More than one instance of the same class can be in
existence at any one time.
7
ENCAPSULATION
 Storing data and functions in a single unit
(class).
 Mechanism that binds together code and
data in manipulates.
 Keeps both safe from outside interference
and misuse.
 Data cannot be accessible to the outside
world and only those functions which are
stored in the class can access it.
8
DATA ABSTRACTION
 Abstraction refers to the act of representing
essential features without including the background
details or explanations.
 Classes use the concept of abstraction and are
defined as a list of abstract attributes.
9
INHERITANCE
 Provides a powerful and natural mechanism for
organizing and structuring your software.
 This section explains how classes inherit state and
behavior from their superclasses, and explains how
to derive one class from another using the simple
syntax provided by the Java programming
language.
10
POLYMORPHISM
 The ability to take more than one form.
 An operation may exhibit different behaviors in
different instances.
 The behavior depends on the data types used in
the operation.
 In general, polymorphism means “one interface,
multiple method”
 Reduce complexity by allowing the same
interface to be used to specify a general class of
action.
11
DISTINGUISH BETWEEN ABSTRACTION AND
ENCAPSULATION
ABSTRACTION ENCAPSULATION
Refers to showing only the
necessary details to the intended
user
Means to hide (data hiding).
Wrapping, just hiding
properties and methods.
Used in programming languages
to make abstract class.
Used for hide the code and
data in a single unit to protect
the data from the outside the
world.
Abstraction is implemented using
interface and abstract class
Encapsulation is
implemented using private
and protected access
modifier. 12
EXAMPLES
ABSTRACTION
ENCAPSULATION
Class Encapsulation
{
private int marks;
public int Marks
{
get { return marks; }
set { marks = value;}
}
}
abstract class Abstraction
{
public abstract void
doAbstraction();
}
public class AbstractionImpl:
Abstraction
{
public void doAbstraction()
{
//Implement it
}
}
13
DIFFERENCES
Structured Programming OOP
Follow top-down approach to
program design.
Follow bottom-up approach in
program design.
Data and Functions don’t tide with
each other.
Functions and data are tide
together.
Large programs are divided into
smaller self contained program
segment known as functions.
Programs are divided into entity
called Objects.
Data moves openly around the
system from function to function.
Data is hidden and can’t be
accessed by the external world
Functions are dependent so
reusability is not possible
Functions are not dependent so
reusability is possible 14
END~
 Nurul Shazliana bt Sahak (01DIP13F1059)
 Fatimah bt Mostapa Kamal
(01DIP13F1048)
 Nur Atiyah bt Mohd Radzi (01DIP13F1057)
 Aida binti Ramlan (01DIP13F1043)
15

Contenu connexe

Tendances

Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oopcolleges
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming pptNitesh Dubey
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS abhishek kumar
 
Object Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significanceObject Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significanceGajesh Bhat
 
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 JavaMadishetty Prathibha
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programmingAmar Jukuntla
 
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 4MOHIT TOMAR
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVAAnkita Totala
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming languageMd.Al-imran Roton
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principlesdeonpmeyer
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++rprajat007
 

Tendances (20)

Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Object Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significanceObject Oriented Programming : A Brief History and its significance
Object Oriented Programming : A Brief History and its significance
 
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
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 
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
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVA
 
OOP Introduction with java programming language
OOP Introduction with java programming languageOOP Introduction with java programming language
OOP Introduction with java programming language
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Chapter 05 classes and objects
Chapter 05 classes and objectsChapter 05 classes and objects
Chapter 05 classes and objects
 
OOPS Basics With Example
OOPS Basics With ExampleOOPS Basics With Example
OOPS Basics With Example
 
Data types in java
Data types in javaData types in java
Data types in java
 
Oop Presentation
Oop PresentationOop Presentation
Oop Presentation
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
Java Basic Oops Concept
Java Basic Oops ConceptJava Basic Oops Concept
Java Basic Oops Concept
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++
 
Unit 2 Java
Unit 2 JavaUnit 2 Java
Unit 2 Java
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 

En vedette

Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionRai University
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programmingAbzetdin Adamov
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingHüseyin Ergin
 
Object oriented programming concept
Object oriented programming conceptObject oriented programming concept
Object oriented programming conceptPina Parmar
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPMudasir Qazi
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaCPD INDIA
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSAshita Agrawal
 
20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental Principles20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental PrinciplesIntro C# Book
 

En vedette (12)

Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
 
Basic concept of Object Oriented Programming
Basic concept of Object Oriented Programming Basic concept of Object Oriented Programming
Basic concept of Object Oriented Programming
 
C++ oop
C++ oopC++ oop
C++ oop
 
Introduction to object oriented programming
Introduction to object oriented programmingIntroduction to object oriented programming
Introduction to object oriented programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object oriented programming concept
Object oriented programming conceptObject oriented programming concept
Object oriented programming concept
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental Principles20. Object-Oriented Programming Fundamental Principles
20. Object-Oriented Programming Fundamental Principles
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 

Similaire à the Concept of Object-Oriented Programming

Similaire à the Concept of Object-Oriented Programming (20)

Bab satu
Bab satuBab satu
Bab satu
 
babsatu-140703233001-phpapp666666601.pdf
babsatu-140703233001-phpapp666666601.pdfbabsatu-140703233001-phpapp666666601.pdf
babsatu-140703233001-phpapp666666601.pdf
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Benefits of encapsulation
Benefits of encapsulationBenefits of encapsulation
Benefits of encapsulation
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programming
 
Top 30 Technical interview questions
Top 30 Technical interview questionsTop 30 Technical interview questions
Top 30 Technical interview questions
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
Features of Object Oriented Programming.pptx
Features of Object Oriented Programming.pptxFeatures of Object Oriented Programming.pptx
Features of Object Oriented Programming.pptx
 
Ah java-ppt2
Ah java-ppt2Ah java-ppt2
Ah java-ppt2
 
1 intro
1 intro1 intro
1 intro
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docxA Survey of Object Oriented Programming LanguagesMaya Hris.docx
A Survey of Object Oriented Programming LanguagesMaya Hris.docx
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Birasa 1
Birasa 1Birasa 1
Birasa 1
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programming
 
OOP
OOPOOP
OOP
 
Unit 1 OOSE
Unit 1 OOSE Unit 1 OOSE
Unit 1 OOSE
 

Dernier

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

the Concept of Object-Oriented Programming

  • 1. INTRODUCTION TO OBJECT- ORIENTED PROGRAMMING (OOP) 1
  • 2. OOP CONCEPT  Enable programmers to create modules that do not need to be changed when a new type of object is added.  Programmer can simply create a new object that inherits many of its features from existing objects  Makes object-oriented programs easier to modify 2
  • 3. HISTORY OF OOP  Many people believe that OOP is a product of the 1980s (Bjarne Stroustrup).  Actually, SIMULA 1 (1962) and Simula 67 (1967) [earliest object-oriented languages]  The work on the Simula languages (Ole-John Dahl and Kristen Nygaard) at the Norwegian Computing Center in Oslo, Norway.  Most of the advantages of OOP available in the earlier Simula languages, it wasn't until C++ became entrenched in the 1990s that OOP began to flourish. 3
  • 4. ADVANTAGES OF USING OOP  OOP provides a clear modular structure for programs which makes it good for defining abstract data types where implementation details are hidden and the unit has a clearly defined interface.  OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones.  OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. 4
  • 5. TERMINOLOGIES OF OOP  Classes  Object  Encapsulation  Data Abstraction  Inheritance  Polymorphism 5
  • 6. CLASSES  A collection of objects of a similar type.  Once a class is defined, any number of objects can be created which belong to that class.  A class is a blueprint, or prototype, that defines the variables and the methods common to all objects of a certain kind. 6
  • 7. OBJECT  An instance of a class.  A class must be instantiated into an object before it can be used in the software.  A software bundle of related state and behavior.  More than one instance of the same class can be in existence at any one time. 7
  • 8. ENCAPSULATION  Storing data and functions in a single unit (class).  Mechanism that binds together code and data in manipulates.  Keeps both safe from outside interference and misuse.  Data cannot be accessible to the outside world and only those functions which are stored in the class can access it. 8
  • 9. DATA ABSTRACTION  Abstraction refers to the act of representing essential features without including the background details or explanations.  Classes use the concept of abstraction and are defined as a list of abstract attributes. 9
  • 10. INHERITANCE  Provides a powerful and natural mechanism for organizing and structuring your software.  This section explains how classes inherit state and behavior from their superclasses, and explains how to derive one class from another using the simple syntax provided by the Java programming language. 10
  • 11. POLYMORPHISM  The ability to take more than one form.  An operation may exhibit different behaviors in different instances.  The behavior depends on the data types used in the operation.  In general, polymorphism means “one interface, multiple method”  Reduce complexity by allowing the same interface to be used to specify a general class of action. 11
  • 12. DISTINGUISH BETWEEN ABSTRACTION AND ENCAPSULATION ABSTRACTION ENCAPSULATION Refers to showing only the necessary details to the intended user Means to hide (data hiding). Wrapping, just hiding properties and methods. Used in programming languages to make abstract class. Used for hide the code and data in a single unit to protect the data from the outside the world. Abstraction is implemented using interface and abstract class Encapsulation is implemented using private and protected access modifier. 12
  • 13. EXAMPLES ABSTRACTION ENCAPSULATION Class Encapsulation { private int marks; public int Marks { get { return marks; } set { marks = value;} } } abstract class Abstraction { public abstract void doAbstraction(); } public class AbstractionImpl: Abstraction { public void doAbstraction() { //Implement it } } 13
  • 14. DIFFERENCES Structured Programming OOP Follow top-down approach to program design. Follow bottom-up approach in program design. Data and Functions don’t tide with each other. Functions and data are tide together. Large programs are divided into smaller self contained program segment known as functions. Programs are divided into entity called Objects. Data moves openly around the system from function to function. Data is hidden and can’t be accessed by the external world Functions are dependent so reusability is not possible Functions are not dependent so reusability is possible 14
  • 15. END~  Nurul Shazliana bt Sahak (01DIP13F1059)  Fatimah bt Mostapa Kamal (01DIP13F1048)  Nur Atiyah bt Mohd Radzi (01DIP13F1057)  Aida binti Ramlan (01DIP13F1043) 15

Notes de l'éditeur

  1. type of programming in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects
  2. A class is a blueprint or prototype from which objects are created. This section defines a class that models the state and behavior of a real-world object. It intentionally focuses on the basics, showing how even a simple class can cleanly model state and behavior.