SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Lecture 2: Thinking Object-Oriented (2) CSCI-383 Object-Oriented Programming & Design Ji Ruan 2009/09/16
Overview  ,[object Object],[object Object],[object Object]
Programming Paradigms ,[object Object],[object Object]
Programming Paradigms ,[object Object],[object Object],[object Object],[object Object],[object Object]
Imperative Programming ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A Way of Viewing the World!
Recursive Design The structure of the part mirrors the structure of the larger unit.
Six principles of Object-Oriented Programming ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Illustration of OOP Concepts -  Sending Flowers to a Friend ,[object Object],[object Object],[object Object],[object Object],[object Object]
Agents and Communities ,[object Object],[object Object],[object Object]
Agents and Communities Definition:  An object-oriented program is structured as a community of interacting agents called  objects . Each object has a role to play. Each object provides a service or performs an action that is used by other members of the community.
Elements of OOP - Objects So we have Kay's principle No. 1: Everything is an object. Actions in OOP are performed by agents, called instances or objects. There are many agents working together in our scenario. Chris, Robin, the florist in Robins city, the delivery person, the flower arranger, and the grower etc. Each agent has a part to play, and the result is produced when all work together in the solution of a problem.
Elements of OOP - Messages Principle No. 2: Objects perform computation by making requests of each other through the passing of messages. Actions in OOP are produced in response to requests for actions, called  messages . An instance may accept a message, and in return will perform an action and return a value. To begin the process of sending the flowers, Chris gives a message to Fred. Fred in turn gives a message to the florist in Robins city, who gives another message to the driver and so on.
Information Hiding ,[object Object],[object Object],[object Object]
Elements of OOP - Receivers ,[object Object],[object Object],[object Object]
Different Receivers, Same Message, Different Actions Var Fred : Florist; Elizabeth : Friend; Ken : Dentist; begin Fred.sendFlowersTo(myFriend); { will work } Elizabeth.sendFlowersTo(myFriend); { also work } Ken.sendFlowersTo(myFriend); { probably not work } end;   The same message will result in different actions, depending upon who it is given to.
Behavior and Interpretation ,[object Object],[object Object],[object Object]
Elements of OOP - Recursive Design Principle No. 3:  Every object has it's own memory, which consists of other objects. Each object is like a miniature computer itself - a specialized processor performing a specific task.
Non-interference Principle ,[object Object],[object Object],[object Object]
Elements of OOP - Classes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchies of Categories ,[object Object],[object Object]
Class Hierarchies
Class Hierarchies link to larger size. Charles Darwin  (1809-1882) Tree of Life
Elements of OOP - Inheritance Principle No. 6:  Classes are organized into a singly-rooted tree structure, called an inheritance hierarchy Information (data and/or behavior) we associate with one level of abstraction in a class hierarchy is automatically applicable to lower levels of the hierarchy.
Elements of OOP - Overriding ,[object Object],[object Object],[object Object],[object Object]
Computation as simulation ,[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],Assignment 1:

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (12)

Basic concept of object oriented programming
Basic   concept   of    object  oriented  programmingBasic   concept   of    object  oriented  programming
Basic concept of object oriented programming
 
OOPS with C++ | Concepts of OOPS | Introduction
OOPS with C++ | Concepts of OOPS | IntroductionOOPS with C++ | Concepts of OOPS | Introduction
OOPS with C++ | Concepts of OOPS | Introduction
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
Oops
OopsOops
Oops
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
 
principle of oop’s in cpp
principle of oop’s in cppprinciple of oop’s in cpp
principle of oop’s in cpp
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Oops
OopsOops
Oops
 
Oo ps concepts in c++
Oo ps concepts in c++Oo ps concepts in c++
Oo ps concepts in c++
 
Towards Building Semantic Role Labeler for Indian Languages
Towards Building Semantic Role Labeler for Indian LanguagesTowards Building Semantic Role Labeler for Indian Languages
Towards Building Semantic Role Labeler for Indian Languages
 

Andere mochten auch

XKE - Programming Paradigms & Constructs
XKE - Programming Paradigms & ConstructsXKE - Programming Paradigms & Constructs
XKE - Programming Paradigms & ConstructsNicolas Demengel
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Sakthi Durai
 
Paradigmes de Programmation
Paradigmes de ProgrammationParadigmes de Programmation
Paradigmes de Programmationmahfoudsam
 
Programming Paradigms Seminar 1
Programming Paradigms Seminar 1Programming Paradigms Seminar 1
Programming Paradigms Seminar 1neoxiuting
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Andere mochten auch (7)

XKE - Programming Paradigms & Constructs
XKE - Programming Paradigms & ConstructsXKE - Programming Paradigms & Constructs
XKE - Programming Paradigms & Constructs
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languages
 
Paradigmes de Programmation
Paradigmes de ProgrammationParadigmes de Programmation
Paradigmes de Programmation
 
Programming Paradigms Seminar 1
Programming Paradigms Seminar 1Programming Paradigms Seminar 1
Programming Paradigms Seminar 1
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Ähnlich wie CSCI-383 Lecture 2: Thinking Object-Oriented (2)

M01_OO_Intro.ppt
M01_OO_Intro.pptM01_OO_Intro.ppt
M01_OO_Intro.pptRAJESH S
 
Introduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad balochIntroduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad balochSarmad Baloch
 
M01 Oo Intro
M01 Oo IntroM01 Oo Intro
M01 Oo IntroDang Tuan
 
Object Oriented Analysis And Design
Object Oriented Analysis And DesignObject Oriented Analysis And Design
Object Oriented Analysis And DesignSahil Mahajan
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented ConceptsAbdalla Mahmoud
 
M01_OO_Intro.ppt
M01_OO_Intro.pptM01_OO_Intro.ppt
M01_OO_Intro.pptRojaPogul1
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesJessica Deakin
 
Ooad notes
Ooad notesOoad notes
Ooad notesNancyJP
 
Summary Of Defending Against The Indefensible Essay
Summary Of Defending Against The Indefensible EssaySummary Of Defending Against The Indefensible Essay
Summary Of Defending Against The Indefensible EssayBrenda Zerr
 
To Ask or To Sense? Planning to Integrate Speech and Sensorimotor Acts
To Ask or To Sense? Planning to Integrate Speech and Sensorimotor ActsTo Ask or To Sense? Planning to Integrate Speech and Sensorimotor Acts
To Ask or To Sense? Planning to Integrate Speech and Sensorimotor Actstoukaigi
 
Basics of object oriented programming
Basics of object oriented programmingBasics of object oriented programming
Basics of object oriented programmingNitin Kumar Kashyap
 
Frame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptxFrame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptxnilesh405711
 
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
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programmingRiturajJain8
 

Ähnlich wie CSCI-383 Lecture 2: Thinking Object-Oriented (2) (20)

2.oop concept
2.oop concept2.oop concept
2.oop concept
 
M01_OO_Intro.ppt
M01_OO_Intro.pptM01_OO_Intro.ppt
M01_OO_Intro.ppt
 
Introduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad balochIntroduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad baloch
 
What is OOP?
What is OOP?What is OOP?
What is OOP?
 
M01 Oo Intro
M01 Oo IntroM01 Oo Intro
M01 Oo Intro
 
Object Oriented Analysis And Design
Object Oriented Analysis And DesignObject Oriented Analysis And Design
Object Oriented Analysis And Design
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Object-Oriented Concepts
Object-Oriented ConceptsObject-Oriented Concepts
Object-Oriented Concepts
 
M01_OO_Intro.ppt
M01_OO_Intro.pptM01_OO_Intro.ppt
M01_OO_Intro.ppt
 
Oop basic concepts
Oop basic conceptsOop basic concepts
Oop basic concepts
 
Class 4
Class 4Class 4
Class 4
 
Object And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) LanguagesObject And Oriented Programing ( Oop ) Languages
Object And Oriented Programing ( Oop ) Languages
 
Ooad notes
Ooad notesOoad notes
Ooad notes
 
Summary Of Defending Against The Indefensible Essay
Summary Of Defending Against The Indefensible EssaySummary Of Defending Against The Indefensible Essay
Summary Of Defending Against The Indefensible Essay
 
To Ask or To Sense? Planning to Integrate Speech and Sensorimotor Acts
To Ask or To Sense? Planning to Integrate Speech and Sensorimotor ActsTo Ask or To Sense? Planning to Integrate Speech and Sensorimotor Acts
To Ask or To Sense? Planning to Integrate Speech and Sensorimotor Acts
 
Basics of object oriented programming
Basics of object oriented programmingBasics of object oriented programming
Basics of object oriented programming
 
UNIT 2.pdf
UNIT 2.pdfUNIT 2.pdf
UNIT 2.pdf
 
Frame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptxFrame-Script and Predicate logic.pptx
Frame-Script and Predicate logic.pptx
 
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
 
introduction of Object oriented programming
introduction of Object oriented programmingintroduction of Object oriented programming
introduction of Object oriented programming
 

Kürzlich hochgeladen

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

CSCI-383 Lecture 2: Thinking Object-Oriented (2)

  • 1. Lecture 2: Thinking Object-Oriented (2) CSCI-383 Object-Oriented Programming & Design Ji Ruan 2009/09/16
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. A Way of Viewing the World!
  • 7. Recursive Design The structure of the part mirrors the structure of the larger unit.
  • 8.
  • 9.
  • 10.
  • 11. Agents and Communities Definition: An object-oriented program is structured as a community of interacting agents called objects . Each object has a role to play. Each object provides a service or performs an action that is used by other members of the community.
  • 12. Elements of OOP - Objects So we have Kay's principle No. 1: Everything is an object. Actions in OOP are performed by agents, called instances or objects. There are many agents working together in our scenario. Chris, Robin, the florist in Robins city, the delivery person, the flower arranger, and the grower etc. Each agent has a part to play, and the result is produced when all work together in the solution of a problem.
  • 13. Elements of OOP - Messages Principle No. 2: Objects perform computation by making requests of each other through the passing of messages. Actions in OOP are produced in response to requests for actions, called messages . An instance may accept a message, and in return will perform an action and return a value. To begin the process of sending the flowers, Chris gives a message to Fred. Fred in turn gives a message to the florist in Robins city, who gives another message to the driver and so on.
  • 14.
  • 15.
  • 16. Different Receivers, Same Message, Different Actions Var Fred : Florist; Elizabeth : Friend; Ken : Dentist; begin Fred.sendFlowersTo(myFriend); { will work } Elizabeth.sendFlowersTo(myFriend); { also work } Ken.sendFlowersTo(myFriend); { probably not work } end;   The same message will result in different actions, depending upon who it is given to.
  • 17.
  • 18. Elements of OOP - Recursive Design Principle No. 3:  Every object has it's own memory, which consists of other objects. Each object is like a miniature computer itself - a specialized processor performing a specific task.
  • 19.
  • 20.
  • 21.
  • 23. Class Hierarchies link to larger size. Charles Darwin (1809-1882) Tree of Life
  • 24. Elements of OOP - Inheritance Principle No. 6:  Classes are organized into a singly-rooted tree structure, called an inheritance hierarchy Information (data and/or behavior) we associate with one level of abstraction in a class hierarchy is automatically applicable to lower levels of the hierarchy.
  • 25.
  • 26.
  • 27.
  • 28.