SlideShare a Scribd company logo
1 of 23
1
Welcome
Special Thanks To
Md. Sharif Hossen
Lecturer
Department of ICT
Comilla University.
2
Object-Oriented Vs. Object based
Programming
Id Name
1109025 Partha Chakrabarty
1109026 Md. Mujibur Rahman Majumder
1109028 Md. Natik Alam Bhuyan Tahsin
1109031 Md. Al Fahad
1109032 Md. Rashedul Islam
Presented By :
Outline
3
Overview
Class and Object.
Object- oriented Programming
Object based Programing
Object based vs. object-oriented programming
Conclusion
Overview
4
 What is a Class?
 What is a Object?
 What is an Object-Oriented Programming?
 Requirements of Object-Oriented language.
 What is an Object Based Programming?
 Why we use object based instead of object oriented programming?
 Difference between Object based and Object-Oriented Programming?
What is a Class?
5
 A class can be defined as a template/blueprint that describes the
state or behavior of objects of certain kinds.
 Class Contain Properties and Function.
 Example : Student , Animal, Car etc.
What is an Object?
6
 Object refers to a particular instance of a class where the object can
be a combination of variables, functions, and data structures.
 An object consists of data of its own.
Example of Class and Object.
7
Example of Class and Object Programmatically
8
Object-Oriented Programming
9
 The basic idea behind an Object Oriented Programming
language is to combine into a single unit both data and the
methods (functions) that operate on the data.
 Some of the popular OOP languages are -
 C++
 Java
 C#
Requirements for OOP
10
 To be object oriented, a language must support
 Encapsulation
 Inheritance
 Polymorphism
Encapsulation
11
 The whole idea behind the data encapsulation is to hide the
implementation details from users. This is achieved through the state
(the private fields) and the behaviors (the public methods) of a Class.
 Often, for practical reasons, an object may wish to expose some of its
variables or hide some of its methods.
 Encapsulation uses three common types of modifier to encapsulate
data.
 Public
 Private
 Protected
Inheritance
12
 Inheritance is a fundamental feature of an Object-Oriented
programming. It is the process of creating a new Class, called the
Derived Class, from the existing class, called the Base Class
 Inheritance is a very elegant way to reuse and modify the data and
functionality that has already been defined in the Base Class, also we
can add new data and functionality to the Derived Class.
Inheritance Contd.
13
 Since the Derived Class inherits all properties of the Base Class, the
Derived Class has a larger set of properties than the Base Class.
 However, the Derived Class may override some or all the properties of
the Base Class.
Types of Inheritance
14
A
B
C
A B
C
A-1
A-2
B-1
B-2
AB
Multi-level Inheritance
Multiple Inheritance
Multiple Multi-level Inheritance
Polymorphism
15
 The ability to appear in many forms.
 In object-oriented programming, polymorphism refers to a
programming language's ability to process objects differently
depending on their data type or class.
 Polymorphism allows us to invoke derived class methods through a
base class reference during runtime.
 E.g. e-bike Acceleration system.
Electronically / Mechanically
Polymorphism contd.
16
Object Based Programming
17
 Object Based Programming is based on the idea of encapsulating
state and operations inside “objects”.
 Object-based languages need not support inheritance or
polymorphism . While Object oriented language support all
feature of OOPS i.e. Inheritance, polymorphism etc.
 Object Based Language Build in type object are available like
window object in JavaScript .
 Example: JavaScript, VB
Why we use Object based instead of OOP
18
 The main benefit of Object based Programming is that
it can be understood by the common human.
 Object Based is much easier and more robust than
Object Oriented.
 It allows for fast creation of web page events.
 It allows more freedom in the creation of objects.
http://www.htmlgoodies.com/beyond/javascript/article.php/3470971
Drawbacks of object based programming
19
 Object based programming is less secure. Because the
code executes on the user’s computer, in some cases it
can be exploited for malicious purposes.
 Object based programming sometimes interpreted
differently by different browsers.
http://www.htmlgoodies.com/beyond/javascript/article.php/3470971
Object based Programming Object oriented Programming
Object-based language doesn't
support all the features of
OOPs like Polymorphism and
Inheritance.
Object-based language has
built-in object like JavaScript
has window object.
Examples : JavaScript, VB etc.
Object-oriented language
supports all the features of
OOPs
.
Object-oriented language
doesn't have built-in object.
Examples : C++, C#, Java etc.
20
Object based vs. Object-oriented programming
Conclusion
21
From the above discussion, we clearly understand about the
difference between Object Based and Object Oriented
Programming and also when we use Object based instead of
Object Oriented Programming.
Question ?
22
23

More Related Content

What's hot

Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1Shahzad
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns pptAman Jain
 
Control Flow Analysis
Control Flow AnalysisControl Flow Analysis
Control Flow AnalysisEdgar Barbosa
 
The Object Model
The Object Model  The Object Model
The Object Model yndaravind
 
Decentralized access control with anonymous authentication of data stored in ...
Decentralized access control with anonymous authentication of data stored in ...Decentralized access control with anonymous authentication of data stored in ...
Decentralized access control with anonymous authentication of data stored in ...IGEEKS TECHNOLOGIES
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 
Knowledge representation and reasoning
Knowledge representation and reasoningKnowledge representation and reasoning
Knowledge representation and reasoningMaryam Maleki
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Javabackdoor
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteTushar B Kute
 
OOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - LabOOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - LabVicter Paul
 

What's hot (20)

Packages in java
Packages in javaPackages in java
Packages in java
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
UML
UMLUML
UML
 
Design Pattern For C# Part 1
Design Pattern For C# Part 1Design Pattern For C# Part 1
Design Pattern For C# Part 1
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Design patterns ppt
Design patterns pptDesign patterns ppt
Design patterns ppt
 
Control Flow Analysis
Control Flow AnalysisControl Flow Analysis
Control Flow Analysis
 
Java packages
Java packagesJava packages
Java packages
 
.Net Assemblies
.Net Assemblies.Net Assemblies
.Net Assemblies
 
The Object Model
The Object Model  The Object Model
The Object Model
 
Threading in C#
Threading in C#Threading in C#
Threading in C#
 
Decentralized access control with anonymous authentication of data stored in ...
Decentralized access control with anonymous authentication of data stored in ...Decentralized access control with anonymous authentication of data stored in ...
Decentralized access control with anonymous authentication of data stored in ...
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Knowledge representation and reasoning
Knowledge representation and reasoningKnowledge representation and reasoning
Knowledge representation and reasoning
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Object Oriented Programming with Java
Object Oriented Programming with JavaObject Oriented Programming with Java
Object Oriented Programming with Java
 
Generics
GenericsGenerics
Generics
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Design patterns
Design patternsDesign patterns
Design patterns
 
OOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - LabOOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - Lab
 

Similar to Object oriented vs. object based programming

Similar to Object oriented vs. object based programming (20)

Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Ah java-ppt2
Ah java-ppt2Ah java-ppt2
Ah java-ppt2
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
PHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptxPHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptx
 
object oriented programming(oops)
object oriented programming(oops)object oriented programming(oops)
object oriented programming(oops)
 
Object oriented programing
Object oriented programingObject oriented programing
Object oriented programing
 
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
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
JAVA - Oops Concept.pptx
JAVA - Oops Concept.pptxJAVA - Oops Concept.pptx
JAVA - Oops Concept.pptx
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
OOP
OOPOOP
OOP
 
Benefits of encapsulation
Benefits of encapsulationBenefits of encapsulation
Benefits of encapsulation
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
 
1 intro
1 intro1 intro
1 intro
 
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
 

More from Mohammad Kamrul Hasan

Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...
Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...
Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...Mohammad Kamrul Hasan
 
What should or not be programmed on the web
What should or not be programmed on the  webWhat should or not be programmed on the  web
What should or not be programmed on the webMohammad Kamrul Hasan
 
Tasks suitable for programming on the web
Tasks suitable for programming on the webTasks suitable for programming on the web
Tasks suitable for programming on the webMohammad Kamrul Hasan
 
Programming paradigm and web programming
Programming paradigm and web programmingProgramming paradigm and web programming
Programming paradigm and web programmingMohammad Kamrul Hasan
 
Choice of programming language for web developing.
Choice of programming language for web developing.Choice of programming language for web developing.
Choice of programming language for web developing.Mohammad Kamrul Hasan
 

More from Mohammad Kamrul Hasan (8)

Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...
Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...
Distinguishing Performance of 60-GHz Micro strip Patch Antenna for Different ...
 
Truth management system
Truth  management systemTruth  management system
Truth management system
 
What should or not be programmed on the web
What should or not be programmed on the  webWhat should or not be programmed on the  web
What should or not be programmed on the web
 
Web browsers and web document
Web browsers and web documentWeb browsers and web document
Web browsers and web document
 
Tasks suitable for programming on the web
Tasks suitable for programming on the webTasks suitable for programming on the web
Tasks suitable for programming on the web
 
Static dynamic and active web pages
Static dynamic and active web pagesStatic dynamic and active web pages
Static dynamic and active web pages
 
Programming paradigm and web programming
Programming paradigm and web programmingProgramming paradigm and web programming
Programming paradigm and web programming
 
Choice of programming language for web developing.
Choice of programming language for web developing.Choice of programming language for web developing.
Choice of programming language for web developing.
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Recently uploaded (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Object oriented vs. object based programming

  • 1. 1 Welcome Special Thanks To Md. Sharif Hossen Lecturer Department of ICT Comilla University.
  • 2. 2 Object-Oriented Vs. Object based Programming Id Name 1109025 Partha Chakrabarty 1109026 Md. Mujibur Rahman Majumder 1109028 Md. Natik Alam Bhuyan Tahsin 1109031 Md. Al Fahad 1109032 Md. Rashedul Islam Presented By :
  • 3. Outline 3 Overview Class and Object. Object- oriented Programming Object based Programing Object based vs. object-oriented programming Conclusion
  • 4. Overview 4  What is a Class?  What is a Object?  What is an Object-Oriented Programming?  Requirements of Object-Oriented language.  What is an Object Based Programming?  Why we use object based instead of object oriented programming?  Difference between Object based and Object-Oriented Programming?
  • 5. What is a Class? 5  A class can be defined as a template/blueprint that describes the state or behavior of objects of certain kinds.  Class Contain Properties and Function.  Example : Student , Animal, Car etc.
  • 6. What is an Object? 6  Object refers to a particular instance of a class where the object can be a combination of variables, functions, and data structures.  An object consists of data of its own.
  • 7. Example of Class and Object. 7
  • 8. Example of Class and Object Programmatically 8
  • 9. Object-Oriented Programming 9  The basic idea behind an Object Oriented Programming language is to combine into a single unit both data and the methods (functions) that operate on the data.  Some of the popular OOP languages are -  C++  Java  C#
  • 10. Requirements for OOP 10  To be object oriented, a language must support  Encapsulation  Inheritance  Polymorphism
  • 11. Encapsulation 11  The whole idea behind the data encapsulation is to hide the implementation details from users. This is achieved through the state (the private fields) and the behaviors (the public methods) of a Class.  Often, for practical reasons, an object may wish to expose some of its variables or hide some of its methods.  Encapsulation uses three common types of modifier to encapsulate data.  Public  Private  Protected
  • 12. Inheritance 12  Inheritance is a fundamental feature of an Object-Oriented programming. It is the process of creating a new Class, called the Derived Class, from the existing class, called the Base Class  Inheritance is a very elegant way to reuse and modify the data and functionality that has already been defined in the Base Class, also we can add new data and functionality to the Derived Class.
  • 13. Inheritance Contd. 13  Since the Derived Class inherits all properties of the Base Class, the Derived Class has a larger set of properties than the Base Class.  However, the Derived Class may override some or all the properties of the Base Class.
  • 14. Types of Inheritance 14 A B C A B C A-1 A-2 B-1 B-2 AB Multi-level Inheritance Multiple Inheritance Multiple Multi-level Inheritance
  • 15. Polymorphism 15  The ability to appear in many forms.  In object-oriented programming, polymorphism refers to a programming language's ability to process objects differently depending on their data type or class.  Polymorphism allows us to invoke derived class methods through a base class reference during runtime.  E.g. e-bike Acceleration system. Electronically / Mechanically
  • 17. Object Based Programming 17  Object Based Programming is based on the idea of encapsulating state and operations inside “objects”.  Object-based languages need not support inheritance or polymorphism . While Object oriented language support all feature of OOPS i.e. Inheritance, polymorphism etc.  Object Based Language Build in type object are available like window object in JavaScript .  Example: JavaScript, VB
  • 18. Why we use Object based instead of OOP 18  The main benefit of Object based Programming is that it can be understood by the common human.  Object Based is much easier and more robust than Object Oriented.  It allows for fast creation of web page events.  It allows more freedom in the creation of objects. http://www.htmlgoodies.com/beyond/javascript/article.php/3470971
  • 19. Drawbacks of object based programming 19  Object based programming is less secure. Because the code executes on the user’s computer, in some cases it can be exploited for malicious purposes.  Object based programming sometimes interpreted differently by different browsers. http://www.htmlgoodies.com/beyond/javascript/article.php/3470971
  • 20. Object based Programming Object oriented Programming Object-based language doesn't support all the features of OOPs like Polymorphism and Inheritance. Object-based language has built-in object like JavaScript has window object. Examples : JavaScript, VB etc. Object-oriented language supports all the features of OOPs . Object-oriented language doesn't have built-in object. Examples : C++, C#, Java etc. 20 Object based vs. Object-oriented programming
  • 21. Conclusion 21 From the above discussion, we clearly understand about the difference between Object Based and Object Oriented Programming and also when we use Object based instead of Object Oriented Programming.
  • 23. 23