SlideShare une entreprise Scribd logo
1  sur  25
Presented by :
• Kunal N. Sharma
• Shyam D. Hathaliya
Presentation on POP vs OOP
Outline:
•Procedure oriented programming language.
•Introduction to pop
•Characteristics
•Advantages
•Disadvantages
•Object Oriented programming language.
•Introduction to OOP
•Concepts of OOP
•Advantages
•Disadvantages
•Difference between OOP vs. POP.
What is procedural oriented programming?
•computer programming language that specifies a series of well-
structured steps and procedures within its programming context to
compose a program.
•It contains a systematic order of statements, functions and
commands to complete a computational task or program.
• In the procedure oriented approach, the problem is viewed as
a sequence of things to be done such as reading, calculating and
printing.
Some characteristics of Procedure Oriented
Programming:
•Large programs are divided into smaller programs known
as functions.
•Most of the functions share
global data.
•Data can easily flow from
one function to another.
•Functions transform data from one form to another.
•Employs top-down approach in program design.
Advantages of procedural oriented programming:
•Allows quick completion. It is faster than oop.
•It is good for general purpose programming.
•It has portable source code-use different compiler to target
Different CPUs.
•Large reference is available on well-tired tested algorithms
No need to reinvent the wheel.
•Requires less memory space.
Disadvantages of procedural oriented programming:
•It is difficult to relate with the real world objects.
•The codes are difficult to maintain, if code grow large.
•It does not have automatic memory management like java.
•There is no security of data.
•Difficult to modify old codes.
•There are no access specifies.
What Object-Oriented Programming?
• Object-oriented programming is centred on
creating objects rather than procedures/
functions.
• Objects are a melding of data and procedures
that manipulate that data.
• Data in an object are known as attributes.
• Procedures/functions in an object are known
as methods.
• Object
• Class
• Message
• Basic Principles of Object Orientation
• Abstraction
• Encapsulation
• Inheritance
• Polymorphism
• Interface and Abstract Class
Concepts of object oriented programming:
• Informally, an object represents an entity, either physical,
conceptual, or software.
– Physical entity
– Conceptual entity
– Software entity
Truck
Chemical
Process
Linked List
• The state of an object normally changes over time.
Name: J Clark
Employee ID: 567138
HireDate: 07/25/1991
Status: Tenured
Discipline: Finance
MaxLoad: 3
Name: J Clark
Employee ID: 567138
Date Hired: July 25, 1991
Status: Tenured
Discipline: Finance
Maximum Course Load: 3 classes
Professor Clark
Professor Clark
• Behavior determines how an object acts and reacts.
• The visible behavior of an object is modeled by the set of
messages it can respond to (operations the object can perform).
Professor Clark’s behavior
Submit Final Grades
Accept Course Offering
Take Sabbatical
Maximum Course Load: 3 classes TakeSabbatical()
Professor Clark
Professor Clark
Modularity is a fundamental aspect of all
successful large programs.
 Abstraction
 Emphasizes relevant characteristics.
 Suppresses other characteristics
Data Abstraction:
BriefCase
- Capacity
- Weight
+ open()
+ close()
• Encapsulation means to design, produce, and
describe software so that it can be easily used
without knowing the details of how it works.
• Also known as information hiding
Interface
Implementation details which
are invisible for client
Information which can’t be
accessed by client
Client Deposit()
Withdraw()
Transfer()
Balance
insterestYTD
Owner
Account_number
Deposit() {…}
Withdraw() {…}
Transfer() {…}
• Inheritance —a way of organizing classes
• Term comes from inheritance of traits like eye color, hair color,
and so on.
• Classes with properties in common can be grouped so that
their common properties are only defined once.
• Is an “is a kind of” relationship
Vehicle
Automobile Motorcycle Bus
Sedan Sports Car School Bus Luxury Bus
Polymorphism:
•The word polymorphism comes from Greek and means having
several different forms. This is one of the essential concepts of
object-oriented programming.
• Where inheritance is related to classes and (their hierarchy),
polymorphism is related to object methods.
•Types of polymorphism :
Overloading polymorphism
Parametric polymorphism
Advantages of Object-Oriented languages
include:
•Ease of management.
•Understand ability.
•Re-usability.
•Improved software-development productivity.
•Improved software maintainability.
•Faster development.
•Lower cost of development.
•Higher-quality software.
•The disadvantages of Object-Oriented
languages include:
•Over-generalization.
•Programs that are built using this language tend to take
longer to initially create.
•Slower program.
Object oriented programming.
Vs
Procedural oriented programming.
OOP POP
Centres in data types (classes,
prototypes)
Functions.
Data scope encapsulated data global data
What is first
data types then algorithms algorithms then data types
Subroutines are called
methods functions
Who access who
data is accessed by code, i.e.
ObjectInstance.getMeARando
mNumber();
code is accessed by data, i.e.
random_number =
getMeARandomNumber();
Have global data
No, but objects can have
public members
Yes, but functions can have
private variables
Data is called
member variable
Any Questions?

Contenu connexe

Tendances

object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming pptNitesh Dubey
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response StructureBhagyashreeGajera1
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP IntroductionHashni T
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language Mohamed Loey
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
358 33 powerpoint-slides_2-functions_chapter-2
358 33 powerpoint-slides_2-functions_chapter-2358 33 powerpoint-slides_2-functions_chapter-2
358 33 powerpoint-slides_2-functions_chapter-2sumitbardhan
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsNilesh Dalvi
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming ConceptsKwangshin Oh
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmbusyking03
 
Procedure oriented programming
Procedure oriented programmingProcedure oriented programming
Procedure oriented programmingMrShahbazRafiq
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Md. Imran Hossain Showrov
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to PseudocodeDamian T. Gordon
 

Tendances (20)

Polymorphism in oop
Polymorphism in oopPolymorphism in oop
Polymorphism in oop
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP Introduction
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
Datatypes in C++.pptx
Datatypes in C++.pptxDatatypes in C++.pptx
Datatypes in C++.pptx
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
358 33 powerpoint-slides_2-functions_chapter-2
358 33 powerpoint-slides_2-functions_chapter-2358 33 powerpoint-slides_2-functions_chapter-2
358 33 powerpoint-slides_2-functions_chapter-2
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
Pointer to function 1
Pointer to function 1Pointer to function 1
Pointer to function 1
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming Concepts
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Procedure oriented programming
Procedure oriented programmingProcedure oriented programming
Procedure oriented programming
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 

Similaire à Presentation c

SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTnikshaikh786
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programmingSaket Khopkar
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.pptsagarjsicg
 
1-Lec - Introduction vhvv,vbvv,v (2).ppt
1-Lec - Introduction vhvv,vbvv,v (2).ppt1-Lec - Introduction vhvv,vbvv,v (2).ppt
1-Lec - Introduction vhvv,vbvv,v (2).pptAqeelAbbas94
 
Object oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oopObject oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oopVaibhav Khanna
 
Introduction to oop with c++
Introduction to oop with c++Introduction to oop with c++
Introduction to oop with c++Shruti Patel
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)Jay Patel
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperLee Greffin
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdfSahajShrimal1
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and DesignRiazAhmad786
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigmsAshok Raj
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programmingAmar Jukuntla
 

Similaire à Presentation c (20)

SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
[OOP - Lec 02] Why do we need OOP
[OOP - Lec 02] Why do we need OOP[OOP - Lec 02] Why do we need OOP
[OOP - Lec 02] Why do we need OOP
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programming
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
1-Lec - Introduction vhvv,vbvv,v (2).ppt
1-Lec - Introduction vhvv,vbvv,v (2).ppt1-Lec - Introduction vhvv,vbvv,v (2).ppt
1-Lec - Introduction vhvv,vbvv,v (2).ppt
 
Object oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oopObject oriented programming 1 introduction to oop
Object oriented programming 1 introduction to oop
 
[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP
 
Introduction to oop with c++
Introduction to oop with c++Introduction to oop with c++
Introduction to oop with c++
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
 
Introduction
IntroductionIntroduction
Introduction
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft Developer
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigms
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 

Dernier

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
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
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 

Dernier (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
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...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 

Presentation c

  • 1. Presented by : • Kunal N. Sharma • Shyam D. Hathaliya Presentation on POP vs OOP
  • 2. Outline: •Procedure oriented programming language. •Introduction to pop •Characteristics •Advantages •Disadvantages •Object Oriented programming language. •Introduction to OOP •Concepts of OOP •Advantages •Disadvantages •Difference between OOP vs. POP.
  • 3.
  • 4. What is procedural oriented programming? •computer programming language that specifies a series of well- structured steps and procedures within its programming context to compose a program. •It contains a systematic order of statements, functions and commands to complete a computational task or program. • In the procedure oriented approach, the problem is viewed as a sequence of things to be done such as reading, calculating and printing.
  • 5. Some characteristics of Procedure Oriented Programming: •Large programs are divided into smaller programs known as functions. •Most of the functions share global data. •Data can easily flow from one function to another. •Functions transform data from one form to another. •Employs top-down approach in program design.
  • 6. Advantages of procedural oriented programming: •Allows quick completion. It is faster than oop. •It is good for general purpose programming. •It has portable source code-use different compiler to target Different CPUs. •Large reference is available on well-tired tested algorithms No need to reinvent the wheel. •Requires less memory space.
  • 7. Disadvantages of procedural oriented programming: •It is difficult to relate with the real world objects. •The codes are difficult to maintain, if code grow large. •It does not have automatic memory management like java. •There is no security of data. •Difficult to modify old codes. •There are no access specifies.
  • 8.
  • 9. What Object-Oriented Programming? • Object-oriented programming is centred on creating objects rather than procedures/ functions. • Objects are a melding of data and procedures that manipulate that data. • Data in an object are known as attributes. • Procedures/functions in an object are known as methods.
  • 10.
  • 11. • Object • Class • Message • Basic Principles of Object Orientation • Abstraction • Encapsulation • Inheritance • Polymorphism • Interface and Abstract Class Concepts of object oriented programming:
  • 12. • Informally, an object represents an entity, either physical, conceptual, or software. – Physical entity – Conceptual entity – Software entity Truck Chemical Process Linked List
  • 13. • The state of an object normally changes over time. Name: J Clark Employee ID: 567138 HireDate: 07/25/1991 Status: Tenured Discipline: Finance MaxLoad: 3 Name: J Clark Employee ID: 567138 Date Hired: July 25, 1991 Status: Tenured Discipline: Finance Maximum Course Load: 3 classes Professor Clark Professor Clark
  • 14. • Behavior determines how an object acts and reacts. • The visible behavior of an object is modeled by the set of messages it can respond to (operations the object can perform). Professor Clark’s behavior Submit Final Grades Accept Course Offering Take Sabbatical Maximum Course Load: 3 classes TakeSabbatical() Professor Clark Professor Clark
  • 15. Modularity is a fundamental aspect of all successful large programs.  Abstraction  Emphasizes relevant characteristics.  Suppresses other characteristics Data Abstraction: BriefCase - Capacity - Weight + open() + close()
  • 16. • Encapsulation means to design, produce, and describe software so that it can be easily used without knowing the details of how it works. • Also known as information hiding
  • 17. Interface Implementation details which are invisible for client Information which can’t be accessed by client Client Deposit() Withdraw() Transfer() Balance insterestYTD Owner Account_number Deposit() {…} Withdraw() {…} Transfer() {…}
  • 18. • Inheritance —a way of organizing classes • Term comes from inheritance of traits like eye color, hair color, and so on. • Classes with properties in common can be grouped so that their common properties are only defined once. • Is an “is a kind of” relationship
  • 19. Vehicle Automobile Motorcycle Bus Sedan Sports Car School Bus Luxury Bus
  • 20. Polymorphism: •The word polymorphism comes from Greek and means having several different forms. This is one of the essential concepts of object-oriented programming. • Where inheritance is related to classes and (their hierarchy), polymorphism is related to object methods. •Types of polymorphism : Overloading polymorphism Parametric polymorphism
  • 21. Advantages of Object-Oriented languages include: •Ease of management. •Understand ability. •Re-usability. •Improved software-development productivity. •Improved software maintainability. •Faster development. •Lower cost of development. •Higher-quality software.
  • 22. •The disadvantages of Object-Oriented languages include: •Over-generalization. •Programs that are built using this language tend to take longer to initially create. •Slower program.
  • 24. OOP POP Centres in data types (classes, prototypes) Functions. Data scope encapsulated data global data What is first data types then algorithms algorithms then data types Subroutines are called methods functions Who access who data is accessed by code, i.e. ObjectInstance.getMeARando mNumber(); code is accessed by data, i.e. random_number = getMeARandomNumber(); Have global data No, but objects can have public members Yes, but functions can have private variables Data is called member variable