Making communications land - Are they received and understood as intended? we...
Â
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
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