SlideShare une entreprise Scribd logo
1  sur  28
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 1
Object-oriented Design
Designing systems using self-
contained objects and object
classes
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 2
Objectives
To explain how a software design may be
represented as a set of interacting objects
To illustrate, with a simple example, the object-
oriented design process
To introduce various models which describe an
object-oriented design
To explain how objects may be represented as
concurrent processes
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 3
Topics covered
Objects, object classes and inheritance
Object identification
An object-oriented design example
Concurrent objects
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 4
Characteristics of OOD
Objects are abstractions of real-world or system
entities and manage themselves
Objects are independent and encapsulate state and
representation information.
System functionality is expressed in terms of
object services
Shared data areas are eliminated. Objects
communicate by message passing
Objects may be distributed and may execute
sequentially or in parallel
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 5
OOD structure
state 3
O3
state 4
O4
state 1
O1
state 6
O6
state 5
O5
state 2
O2
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 6
Advantages of OOD
Easier maintenance. Objects may be
understood as stand-alone entities
Objects are appropriate reusable components
For some systems, there may be an obvious
mapping from real world entities to system
objects
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 7
Object-oriented development
Object-oriented analysis, design and
programming are related but distinct
OOA is concerned with developing an object
model of the application domain
OOD is concerned with developing an object-
oriented system model to implement
requirements
OOP is concerned with realising an OOD using
an OO programming language such as C++
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 8
Object-oriented design methods
Some methods which were originally based on
functions (such as the Yourdon method) have
been adapted to object-oriented design. Other
methods such as the Booch method have been
developed specifically for OOD
HOOD is an object-oriented design method
developed to support Ada programming.
JSD has an object-oriented flavour but does not
conceal entity state information.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 9
OO Design method commonality
The identification of objects, their attributes and
services
The organisation of objects into an aggregation
hierarchy
The construction of dynamic object-use
descriptions which show how services are used
The specification of object interfaces
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 10
Objects, classes and inheritance
Objects are entities in a software system which
represent instances of real-world and system
entities
Object classes are templates for objects. They
may be used to create objects
Object classes may inherit attributes and services
from other object classes
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 11
Objects
An object is an entity which has a state and a defined set of
operations which operate on that state. The state is represented as a
set of object attributes. The operations associated with the object
provide services to other objects (clients) which request these
services when some computation is required. Objects are created
according to some object class definition. An object class definition
serves as a template for objects. It includes declarations of all the
attributes and services which should be associated with an object of
that class.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 12
Object communication
Conceptually, objects communicate by
message passing.
Messages
• The name of the service requested by the calling object.
• Copies of the information required to execute the service
and the name of a holder for the result of the service.
In practice, messages are often implemented
by procedure calls
• Name = procedure name.
• Information = parameter list.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 13
A mail message object class
Replace with portrait slide
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 14
Inheritance
Objects are members of classes which define
attribute types and operations
Classes may be arranged in a class hierarchy
where one class is derived from an existing
class (super-class)
A sub-class inherits the attributes and
operations from its super class and may add
new methods or attributes of its own
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 15
A class or type hierarchy
Replace with portrait slide
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 16
Multiple inheritance
Replace with portrait slide
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 17
Advantages of inheritance
It is an abstraction mechanism which may be
used to classify entities
It is a reuse mechanism at both the design and the
programming level
The inheritance graph is a source of
organisational knowledge about domains and
systems
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 18
Inheritance and OOD
There are differing views as to whether
inheritance is fundamental to OOD.
• View 1. Identifying the inheritance hierarchy or network is a
fundamental part of object-oriented design. Obviously this can
only be implemented using an OOPL.
• View 2. Inheritance is a useful implementation concept which
allows reuse of attribute and operation definitions. Identifying
an inheritance hierarchy at the design stage places unnecessary
restrictions on the implementation.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 19
Object identification
Identifying objects is the most difficult part of
object oriented design.
There is no 'magic formula' for object
identification. It relies on the skill, experience
and domain knowledge of system designers.
Object identification is an iterative process. You
are unlikely to get it right first time
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 20
Approaches to identification
Use a grammatical approach based on a natural
language description of the system (used in Hood
method)
Base the identification on tangible things in the
application domain
Use a behavioural approach and identify objects
based on what participates in what behaviour
Use a scenario-based analysis. Used in the
ObjectOry method
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 21
Objects and operations
Nouns in the description give pointers to objects
in the system
Verbs give pointers to operations associated with
objects
Approach assumes that the designer has a
common sense knowledge of the application
domain as not all objects and services are likely
to be mentioned in the description
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 22
An office information system
The Office Information Retrieval System (OIRS) is
an automatic file clerk which can file documents
under some name in one or more indexes, retrieve
documents, display and maintain document
indexes, archive documents and destroy
documents. The system is activated by a request
from the user and always returns a message to the
user indicating the success or failure of the request.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 23
Preliminary object identification
File
Retrieve
A rchive
Destroy
Docume nt
Name
Display
Delete entry
A dd entry
I ndex
Name
Get command
Put message
U se r R e trieva l
sy ste m
User command
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 24
Object interface design
Concerned with specifying the detail of the object
interfaces. This means defining attribute types
and the signatures and semantics of object
operations
Representation information should be avoided
Precise specification is essential so a
programming language description should be
used
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 25
Concurrent objects
The nature of objects as self-contained entities
make them suitable for concurrent
implementation
The message-passing model of object
communication can be implemented directly if
objects are running on separate processors in a
distributed system
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 26
Active and passive objects
Passive objects.
• The object is implemented as a parallel process (server)
with entry points corresponding to object operations. If no
calls are made to it, the object suspends itself
Active objects
• Objects are implemented as parallel processes and the
internal object state may be changed by the object itself and
not simply by external calls
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 27
OOD is design with information hiding.
Representations may be changed without
extensive system modifications
An object has a private state with associated
constructor and access operations. Objects
provide services (operations) to other objects.
Object identification is a difficult process.
Identifying nouns and verbs in a natural
language description can be a useful starting
point for object identification.
Key points
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 28
Key points
Object interfaces must be precisely defined. A
programming language such as Ada or C++ may
be used for this
Useful documentation of an OOD include object
hierarchy charts and object interaction
diagrams
Objects may be implemented as either
sequential or concurrent entities. Concurrent
objects may be active or passive

Contenu connexe

Tendances (20)

Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software Engineering
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
The Object Model
The Object Model  The Object Model
The Object Model
 
Software requirements
Software requirementsSoftware requirements
Software requirements
 
Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
 
Software design
Software designSoftware design
Software design
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software Engineering
 
Component and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewComponent and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief Overview
 
Object oriented and function oriented design
Object oriented and function oriented designObject oriented and function oriented design
Object oriented and function oriented design
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
 
UML
UMLUML
UML
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 

Similaire à Object Oriented Design Concept

Object oriented design-UNIT V
Object oriented design-UNIT VObject oriented design-UNIT V
Object oriented design-UNIT VAzhar Shaik
 
07 - Design and Implementation.pptx
07 - Design and Implementation.pptx07 - Design and Implementation.pptx
07 - Design and Implementation.pptxssuser13a155
 
C#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentC#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentSVRTechnologies
 
Ch7-Software Engineering 9
Ch7-Software Engineering 9Ch7-Software Engineering 9
Ch7-Software Engineering 9Ian Sommerville
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptTigistTilahun1
 
Function Oriented Design
Function Oriented DesignFunction Oriented Design
Function Oriented DesignSharath g
 
System Modelling
System ModellingSystem Modelling
System ModellingIanBriton
 
Software Engineering - Ch8
Software Engineering - Ch8Software Engineering - Ch8
Software Engineering - Ch8Siddharth Ayer
 
Se chapter 1,2,3 2 mark qa
Se chapter 1,2,3   2 mark  qaSe chapter 1,2,3   2 mark  qa
Se chapter 1,2,3 2 mark qaAruna M
 
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...chess188chess188
 
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...chess188chess188
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT Ipkaviya
 
OOAD-FULL-UNITS (full unit) SEE6A
OOAD-FULL-UNITS (full unit) SEE6AOOAD-FULL-UNITS (full unit) SEE6A
OOAD-FULL-UNITS (full unit) SEE6AJKN JKN
 

Similaire à Object Oriented Design Concept (20)

Ch14
Ch14Ch14
Ch14
 
ch12 (1).ppt
ch12 (1).pptch12 (1).ppt
ch12 (1).ppt
 
Object oriented design-UNIT V
Object oriented design-UNIT VObject oriented design-UNIT V
Object oriented design-UNIT V
 
Testing method pptx
Testing method pptxTesting method pptx
Testing method pptx
 
07 - Design and Implementation.pptx
07 - Design and Implementation.pptx07 - Design and Implementation.pptx
07 - Design and Implementation.pptx
 
UML_Training.ppt
UML_Training.pptUML_Training.ppt
UML_Training.ppt
 
C#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course ContentC#.net, C Sharp.Net Online Training Course Content
C#.net, C Sharp.Net Online Training Course Content
 
Ch7-Software Engineering 9
Ch7-Software Engineering 9Ch7-Software Engineering 9
Ch7-Software Engineering 9
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
ch14.ppt
ch14.pptch14.ppt
ch14.ppt
 
Function Oriented Design
Function Oriented DesignFunction Oriented Design
Function Oriented Design
 
System Modelling
System ModellingSystem Modelling
System Modelling
 
Software Engineering - Ch8
Software Engineering - Ch8Software Engineering - Ch8
Software Engineering - Ch8
 
Se chapter 1,2,3 2 mark qa
Se chapter 1,2,3   2 mark  qaSe chapter 1,2,3   2 mark  qa
Se chapter 1,2,3 2 mark qa
 
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
 
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
Software_Engineering_7th_Edition_Chapters_10_11_Detailed_Software_Design_Prin...
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
Software Processes
Software ProcessesSoftware Processes
Software Processes
 
OOAD-FULL-UNITS (full unit) SEE6A
OOAD-FULL-UNITS (full unit) SEE6AOOAD-FULL-UNITS (full unit) SEE6A
OOAD-FULL-UNITS (full unit) SEE6A
 
System Design
System DesignSystem Design
System Design
 

Dernier

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 

Dernier (20)

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 

Object Oriented Design Concept

  • 1. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 1 Object-oriented Design Designing systems using self- contained objects and object classes
  • 2. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 2 Objectives To explain how a software design may be represented as a set of interacting objects To illustrate, with a simple example, the object- oriented design process To introduce various models which describe an object-oriented design To explain how objects may be represented as concurrent processes
  • 3. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 3 Topics covered Objects, object classes and inheritance Object identification An object-oriented design example Concurrent objects
  • 4. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 4 Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent and encapsulate state and representation information. System functionality is expressed in terms of object services Shared data areas are eliminated. Objects communicate by message passing Objects may be distributed and may execute sequentially or in parallel
  • 5. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 5 OOD structure state 3 O3 state 4 O4 state 1 O1 state 6 O6 state 5 O5 state 2 O2
  • 6. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 6 Advantages of OOD Easier maintenance. Objects may be understood as stand-alone entities Objects are appropriate reusable components For some systems, there may be an obvious mapping from real world entities to system objects
  • 7. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 7 Object-oriented development Object-oriented analysis, design and programming are related but distinct OOA is concerned with developing an object model of the application domain OOD is concerned with developing an object- oriented system model to implement requirements OOP is concerned with realising an OOD using an OO programming language such as C++
  • 8. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 8 Object-oriented design methods Some methods which were originally based on functions (such as the Yourdon method) have been adapted to object-oriented design. Other methods such as the Booch method have been developed specifically for OOD HOOD is an object-oriented design method developed to support Ada programming. JSD has an object-oriented flavour but does not conceal entity state information.
  • 9. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 9 OO Design method commonality The identification of objects, their attributes and services The organisation of objects into an aggregation hierarchy The construction of dynamic object-use descriptions which show how services are used The specification of object interfaces
  • 10. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 10 Objects, classes and inheritance Objects are entities in a software system which represent instances of real-world and system entities Object classes are templates for objects. They may be used to create objects Object classes may inherit attributes and services from other object classes
  • 11. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 11 Objects An object is an entity which has a state and a defined set of operations which operate on that state. The state is represented as a set of object attributes. The operations associated with the object provide services to other objects (clients) which request these services when some computation is required. Objects are created according to some object class definition. An object class definition serves as a template for objects. It includes declarations of all the attributes and services which should be associated with an object of that class.
  • 12. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 12 Object communication Conceptually, objects communicate by message passing. Messages • The name of the service requested by the calling object. • Copies of the information required to execute the service and the name of a holder for the result of the service. In practice, messages are often implemented by procedure calls • Name = procedure name. • Information = parameter list.
  • 13. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 13 A mail message object class Replace with portrait slide
  • 14. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 14 Inheritance Objects are members of classes which define attribute types and operations Classes may be arranged in a class hierarchy where one class is derived from an existing class (super-class) A sub-class inherits the attributes and operations from its super class and may add new methods or attributes of its own
  • 15. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 15 A class or type hierarchy Replace with portrait slide
  • 16. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 16 Multiple inheritance Replace with portrait slide
  • 17. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 17 Advantages of inheritance It is an abstraction mechanism which may be used to classify entities It is a reuse mechanism at both the design and the programming level The inheritance graph is a source of organisational knowledge about domains and systems
  • 18. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 18 Inheritance and OOD There are differing views as to whether inheritance is fundamental to OOD. • View 1. Identifying the inheritance hierarchy or network is a fundamental part of object-oriented design. Obviously this can only be implemented using an OOPL. • View 2. Inheritance is a useful implementation concept which allows reuse of attribute and operation definitions. Identifying an inheritance hierarchy at the design stage places unnecessary restrictions on the implementation.
  • 19. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 19 Object identification Identifying objects is the most difficult part of object oriented design. There is no 'magic formula' for object identification. It relies on the skill, experience and domain knowledge of system designers. Object identification is an iterative process. You are unlikely to get it right first time
  • 20. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 20 Approaches to identification Use a grammatical approach based on a natural language description of the system (used in Hood method) Base the identification on tangible things in the application domain Use a behavioural approach and identify objects based on what participates in what behaviour Use a scenario-based analysis. Used in the ObjectOry method
  • 21. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 21 Objects and operations Nouns in the description give pointers to objects in the system Verbs give pointers to operations associated with objects Approach assumes that the designer has a common sense knowledge of the application domain as not all objects and services are likely to be mentioned in the description
  • 22. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 22 An office information system The Office Information Retrieval System (OIRS) is an automatic file clerk which can file documents under some name in one or more indexes, retrieve documents, display and maintain document indexes, archive documents and destroy documents. The system is activated by a request from the user and always returns a message to the user indicating the success or failure of the request.
  • 23. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 23 Preliminary object identification File Retrieve A rchive Destroy Docume nt Name Display Delete entry A dd entry I ndex Name Get command Put message U se r R e trieva l sy ste m User command
  • 24. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 24 Object interface design Concerned with specifying the detail of the object interfaces. This means defining attribute types and the signatures and semantics of object operations Representation information should be avoided Precise specification is essential so a programming language description should be used
  • 25. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 25 Concurrent objects The nature of objects as self-contained entities make them suitable for concurrent implementation The message-passing model of object communication can be implemented directly if objects are running on separate processors in a distributed system
  • 26. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 26 Active and passive objects Passive objects. • The object is implemented as a parallel process (server) with entry points corresponding to object operations. If no calls are made to it, the object suspends itself Active objects • Objects are implemented as parallel processes and the internal object state may be changed by the object itself and not simply by external calls
  • 27. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 27 OOD is design with information hiding. Representations may be changed without extensive system modifications An object has a private state with associated constructor and access operations. Objects provide services (operations) to other objects. Object identification is a difficult process. Identifying nouns and verbs in a natural language description can be a useful starting point for object identification. Key points
  • 28. ©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 14 Slide 28 Key points Object interfaces must be precisely defined. A programming language such as Ada or C++ may be used for this Useful documentation of an OOD include object hierarchy charts and object interaction diagrams Objects may be implemented as either sequential or concurrent entities. Concurrent objects may be active or passive