SlideShare a Scribd company logo
1 of 16
Course Instructor: Dr. R. Shathanaa
 Object-oriented programming (OOP) is a
programming paradigm that allows you to package
together data states and functionality to modify
those data states, while keeping the details hidden
away. As a result, code with OOP design is
flexible, modular, and abstract. This makes it
particularly useful when you create larger
programs.
©1992-2012 by Pearson Education,
Inc. All Rights Reserved.
 Let’s consider a physical object: a light bulb. A
light (usually) has two possible states: on and off.
It also has functionality that allows you to change
its state: you can turn it on and you turn it off.
Thankfully, you don’t need to know electrical
engineering to use the light! You only need to
know how to interact with it.
©1992-2012 by Pearson Education,
Inc. All Rights Reserved.
 Bring the language “closer” to the problem.
 Many advanced languages are typically
focused on specialized domains (e.g.,
relational databases).
 We want a language that is general purpose,
yet can easily be “tailored” to any domain.
 Smalltalk, C++, Java, etc.
 How different from procedural languages?
 Not different at all: Every (reasonable) language is
“Turing complete”
 Very different: Make expression easier, less error-
prone
 Everything is an object.
 A program is a bunch of objects telling each
other what to do, by sending messages.
 Each object has its own memory, and is made
up of other objects.
 Every object has a type (class).
 All objects of the same type can receive the
same messages.
©1992-2012 by Pearson Education,
Inc. All Rights Reserved.
 Objects, or more precisely, the classes objects come from, are
essentially reusable software components.
◦ There are date objects, time objects, audio objects, video objects, automobile
objects, people objects, etc.
◦ Almost any noun can be reasonably represented as a software object in terms of
attributes (e.g., name, color and size) and behaviors (e.g., calculating, moving
and communicating).
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
 The Automobile as an Object
◦ Let’s begin with a simple analogy.
◦ Suppose you want to drive a car and make it go faster by pressing its
accelerator pedal.
◦ Before you can drive a car, someone has to design it.
◦ A car typically begins as engineering drawings, similar to the blueprints
that describe the design of a house.
◦ Drawings include the design for an accelerator pedal.
◦ Pedal hides from the driver the complex mechanisms that actually make
the car go faster, just as the brake pedal hides the mechanisms that slow
the car, and the steering wheel “hides” the mechanisms that turn the car.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
◦ Enables people with little or no knowledge of how engines,
braking and steering mechanisms work to drive a car easily.
◦ Before you can drive a car, it must be built from the
engineering drawings that describe it.
◦ A completed car has an actual accelerator pedal to make the
car go faster, but even that’s not enough—the car won’t
accelerate on its own (hopefully!), so the driver must press the
pedal to accelerate the car.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
 Methods and Classes
◦ Performing a task in a program requires a method.
◦ The method houses the program statements that actually perform its
tasks.
◦ Hides these statements from its user, just as the accelerator pedal of a
car hides from the driver the mechanisms of making the car go faster.
◦ In Java, we create a program unit called a class to house the set of
methods that perform the class’s tasks.
◦ A class is similar in concept to a car’s engineering drawings, which
house the design of an accelerator pedal, steering wheel, and so on.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
 Instantiation
◦ Just as someone has to build a car from its engineering
drawings before you can actually drive a car, you must build an
object of a class before a program can perform the tasks that
the class’s methods define.
◦ An object is then referred to as an instance of its class.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
 Reuse
◦ Just as a car’s engineering drawings can be reused many times to build
many cars, you can reuse a class many times to build many objects.
◦ Reuse of existing classes when building new classes and programs saves
time and effort.
◦ Reuse also helps you build more reliable and effective systems, because
existing classes and components often have gone through extensive
testing, debugging and performance tuning.
◦ Just as the notion of interchangeable parts was crucial to the Industrial
Revolution, reusable classes are crucial to the software revolution that
has been spurred by object technology.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
 Attributes and Instance Variables
◦ A car has attributes
◦ Color, its number of doors, the amount of gas in its tank, its
current speed and its record of total miles driven (i.e., its
odometer reading).
◦ The car’s attributes are represented as part of its design in its
engineering diagrams.
◦ Every car maintains its own attributes.
◦ Each car knows how much gas is in its own gas tank, but not
how much is in the tanks of other cars.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.
 Messages and Methods Calls
◦ When you drive a car, pressing its gas pedal sends a message
to the car to perform a task—that is, to go faster.
◦ Similarly, you send messages to an object.
◦ Each message is implemented as a method call that tells a
method of the object to perform its task.
©1992-2012 by Pearson Education, Inc.
All Rights Reserved.

More Related Content

Similar to 1.2_IntrotoOOP.pptx

Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptxHeadoftheDepartment
 
Seven elements of technical Agility - Gil Broza - Agile Israel 2013
Seven elements of technical Agility - Gil Broza - Agile Israel 2013Seven elements of technical Agility - Gil Broza - Agile Israel 2013
Seven elements of technical Agility - Gil Broza - Agile Israel 2013AgileSparks
 
Model Driven Architectures
Model Driven ArchitecturesModel Driven Architectures
Model Driven ArchitecturesLalit Kale
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data TypesKaty Allen
 
Resume-Sundar MR
Resume-Sundar MRResume-Sundar MR
Resume-Sundar MRSundar M R
 
Introduction to Rule-based Applications
Introduction to  Rule-based ApplicationsIntroduction to  Rule-based Applications
Introduction to Rule-based Applicationsgiurca
 
Does your website have these elements of responsive web design?
Does your website have these elements of responsive web design? Does your website have these elements of responsive web design?
Does your website have these elements of responsive web design? Experience Dynamics
 
Amit_Surana_2016
Amit_Surana_2016Amit_Surana_2016
Amit_Surana_2016Amit Surana
 
Building Large Sustainable Apps
Building Large Sustainable AppsBuilding Large Sustainable Apps
Building Large Sustainable AppsBuğra Oral
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Vu Tran Lam
 

Similar to 1.2_IntrotoOOP.pptx (20)

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Chapter no 1
Chapter no 1Chapter no 1
Chapter no 1
 
Programming using C++ - slides.pptx
Programming using C++ - slides.pptxProgramming using C++ - slides.pptx
Programming using C++ - slides.pptx
 
Seven elements of technical Agility - Gil Broza - Agile Israel 2013
Seven elements of technical Agility - Gil Broza - Agile Israel 2013Seven elements of technical Agility - Gil Broza - Agile Israel 2013
Seven elements of technical Agility - Gil Broza - Agile Israel 2013
 
Model Driven Architectures
Model Driven ArchitecturesModel Driven Architectures
Model Driven Architectures
 
The Concept Of Abstract Data Types
The Concept Of Abstract Data TypesThe Concept Of Abstract Data Types
The Concept Of Abstract Data Types
 
Resume-Sundar MR
Resume-Sundar MRResume-Sundar MR
Resume-Sundar MR
 
CV - Eng.Sohaib
CV - Eng.SohaibCV - Eng.Sohaib
CV - Eng.Sohaib
 
Project report
Project report Project report
Project report
 
Introduction to Rule-based Applications
Introduction to  Rule-based ApplicationsIntroduction to  Rule-based Applications
Introduction to Rule-based Applications
 
Does your website have these elements of responsive web design?
Does your website have these elements of responsive web design? Does your website have these elements of responsive web design?
Does your website have these elements of responsive web design?
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
 
Car Care.pptx
Car Care.pptxCar Care.pptx
Car Care.pptx
 
Amit_Surana_2016
Amit_Surana_2016Amit_Surana_2016
Amit_Surana_2016
 
Building Large Sustainable Apps
Building Large Sustainable AppsBuilding Large Sustainable Apps
Building Large Sustainable Apps
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Shuzworld Analysis
Shuzworld AnalysisShuzworld Analysis
Shuzworld Analysis
 
object oriented programming(oops)
object oriented programming(oops)object oriented programming(oops)
object oriented programming(oops)
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)
 

Recently uploaded

SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxCHAIRMAN M
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligencemahaffeycheryld
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdfVinayVadlagattu
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentationsj9399037128
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxMustafa Ahmed
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...Amil baba
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书c3384a92eb32
 
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...AshwaniAnuragi1
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Toolssoginsider
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfJNTUA
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxProfASKolap
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样A
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 

Recently uploaded (20)

SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentation
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
 
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
01-vogelsanger-stanag-4178-ed-2-the-new-nato-standard-for-nitrocellulose-test...
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptx
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 

1.2_IntrotoOOP.pptx

  • 1. Course Instructor: Dr. R. Shathanaa
  • 2.  Object-oriented programming (OOP) is a programming paradigm that allows you to package together data states and functionality to modify those data states, while keeping the details hidden away. As a result, code with OOP design is flexible, modular, and abstract. This makes it particularly useful when you create larger programs. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 3.  Let’s consider a physical object: a light bulb. A light (usually) has two possible states: on and off. It also has functionality that allows you to change its state: you can turn it on and you turn it off. Thankfully, you don’t need to know electrical engineering to use the light! You only need to know how to interact with it. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 4.  Bring the language “closer” to the problem.  Many advanced languages are typically focused on specialized domains (e.g., relational databases).  We want a language that is general purpose, yet can easily be “tailored” to any domain.
  • 5.  Smalltalk, C++, Java, etc.  How different from procedural languages?  Not different at all: Every (reasonable) language is “Turing complete”  Very different: Make expression easier, less error- prone
  • 6.  Everything is an object.  A program is a bunch of objects telling each other what to do, by sending messages.  Each object has its own memory, and is made up of other objects.  Every object has a type (class).  All objects of the same type can receive the same messages.
  • 7. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 8.  Objects, or more precisely, the classes objects come from, are essentially reusable software components. ◦ There are date objects, time objects, audio objects, video objects, automobile objects, people objects, etc. ◦ Almost any noun can be reasonably represented as a software object in terms of attributes (e.g., name, color and size) and behaviors (e.g., calculating, moving and communicating). ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 9.  The Automobile as an Object ◦ Let’s begin with a simple analogy. ◦ Suppose you want to drive a car and make it go faster by pressing its accelerator pedal. ◦ Before you can drive a car, someone has to design it. ◦ A car typically begins as engineering drawings, similar to the blueprints that describe the design of a house. ◦ Drawings include the design for an accelerator pedal. ◦ Pedal hides from the driver the complex mechanisms that actually make the car go faster, just as the brake pedal hides the mechanisms that slow the car, and the steering wheel “hides” the mechanisms that turn the car. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 10. ◦ Enables people with little or no knowledge of how engines, braking and steering mechanisms work to drive a car easily. ◦ Before you can drive a car, it must be built from the engineering drawings that describe it. ◦ A completed car has an actual accelerator pedal to make the car go faster, but even that’s not enough—the car won’t accelerate on its own (hopefully!), so the driver must press the pedal to accelerate the car. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 11.  Methods and Classes ◦ Performing a task in a program requires a method. ◦ The method houses the program statements that actually perform its tasks. ◦ Hides these statements from its user, just as the accelerator pedal of a car hides from the driver the mechanisms of making the car go faster. ◦ In Java, we create a program unit called a class to house the set of methods that perform the class’s tasks. ◦ A class is similar in concept to a car’s engineering drawings, which house the design of an accelerator pedal, steering wheel, and so on. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 12.  Instantiation ◦ Just as someone has to build a car from its engineering drawings before you can actually drive a car, you must build an object of a class before a program can perform the tasks that the class’s methods define. ◦ An object is then referred to as an instance of its class. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 13.  Reuse ◦ Just as a car’s engineering drawings can be reused many times to build many cars, you can reuse a class many times to build many objects. ◦ Reuse of existing classes when building new classes and programs saves time and effort. ◦ Reuse also helps you build more reliable and effective systems, because existing classes and components often have gone through extensive testing, debugging and performance tuning. ◦ Just as the notion of interchangeable parts was crucial to the Industrial Revolution, reusable classes are crucial to the software revolution that has been spurred by object technology. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 14. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 15.  Attributes and Instance Variables ◦ A car has attributes ◦ Color, its number of doors, the amount of gas in its tank, its current speed and its record of total miles driven (i.e., its odometer reading). ◦ The car’s attributes are represented as part of its design in its engineering diagrams. ◦ Every car maintains its own attributes. ◦ Each car knows how much gas is in its own gas tank, but not how much is in the tanks of other cars. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.
  • 16.  Messages and Methods Calls ◦ When you drive a car, pressing its gas pedal sends a message to the car to perform a task—that is, to go faster. ◦ Similarly, you send messages to an object. ◦ Each message is implemented as a method call that tells a method of the object to perform its task. ©1992-2012 by Pearson Education, Inc. All Rights Reserved.