+ All Categories
Home > Documents > Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Date post: 16-Jan-2016
Category:
Upload: david-james
View: 215 times
Download: 0 times
Share this document with a friend
Popular Tags:
55
Object Object Oriented Oriented Analysis & Analysis & Design Design Software Engineering Lab. Sharif University of Technology
Transcript
Page 1: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object Oriented Object Oriented Analysis & Analysis &

DesignDesignSoftware Engineering Lab.Sharif University of Technology

Page 2: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Agenda

• Object-Oriented Concepts and Object-Oriented Concepts and PrinciplesPrinciples

• Object Oriented AnalysisObject Oriented Analysis

• Object Oriented DesignObject Oriented Design

Page 3: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Oriented ConceptsObject-Oriented Conceptsand Principlesand Principles

Page 4: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

IntroductionIntroduction► We live in a world of objects.We live in a world of objects.► They can be categorized, described, organized, They can be categorized, described, organized,

combined, manipulated, and created.combined, manipulated, and created.► Object-Oriented view is an abstraction that models Object-Oriented view is an abstraction that models

the world in ways that help us to better the world in ways that help us to better understand and navigate it.understand and navigate it.

► OO approach was first proposed in the late 1960s.OO approach was first proposed in the late 1960s.► As time passes, object technologies are replacing As time passes, object technologies are replacing

classical software development approaches. Why?classical software development approaches. Why?► The answer is not simple. Object technologies lead The answer is not simple. Object technologies lead

to reuse, OO software is easier to maintain, to to reuse, OO software is easier to maintain, to adapt, and to scale.adapt, and to scale.

Page 5: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Oriented ParadigmObject-Oriented Paradigm► For many years, the term OO was used to For many years, the term OO was used to

denote a software development approach denote a software development approach that used one of a number of OO that used one of a number of OO programming languages(e.g. Ada 95, C+programming languages(e.g. Ada 95, C++, Eiffel, Smalltalk)+, Eiffel, Smalltalk)

► Today, the OO paradigm encompasses a Today, the OO paradigm encompasses a complete view of software engineering.complete view of software engineering.

► Software engineers and their managers Software engineers and their managers must consider OORA, OOD, OODA(domain must consider OORA, OOD, OODA(domain anal.), OODBMS.anal.), OODBMS.

Page 6: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

The OO Process The OO Process ModelModel

CustomerCommunication

Planning

Construction & ReleaseCustomerEvaluation

Engineering,

Risk Analysis look-upclasses

in library

extractclasses

if available

engineerclasses

if unavailable

constructnth iterationof system

put newclasses

in library

OO analysisOO designOO programmingOO testing

identifycandidateclasses

Page 7: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Oriented ConceptsObject-Oriented Concepts► consider a chair.consider a chair.► It is a member of a much larger class of It is a member of a much larger class of

objects that we call furniture.objects that we call furniture.► A set of generic attributes can be associated A set of generic attributes can be associated

with every object in the class furniture (e.g. with every object in the class furniture (e.g. cost, dimensions, weight, location, color).cost, dimensions, weight, location, color).

► Chair inherits all attributes defined for the Chair inherits all attributes defined for the class furniture.class furniture.

► Every object in the class furniture can be Every object in the class furniture can be bought, sold, modified, and moved.bought, sold, modified, and moved.

Page 8: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

► Each of these operations will modify one or more Each of these operations will modify one or more attributes of the object.attributes of the object.

► The object Chair encapsulates data, operations, The object Chair encapsulates data, operations, other objects (composite), constants, and other other objects (composite), constants, and other related information.related information.

► Encapsulations means that all of this information is Encapsulations means that all of this information is packaged under one name and can be reused as packaged under one name and can be reused as one specification or program component.one specification or program component.

► Object-oriented = objects + classification + Object-oriented = objects + classification + inheritance + communications. inheritance + communications.

Object-Oriented ConceptsObject-Oriented Concepts

Page 9: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Key Key ConceptsConcepts• classes and class hierarchiesclasses and class hierarchies

– instancesinstances– inheritanceinheritance– abstraction and hidingabstraction and hiding

• objectsobjects– attributesattributes– methodsmethods– encapsulationencapsulation– polymorphismpolymorphism

• messagesmessages

Page 10: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Classes and ObjectsClasses and Objects► A class is an OO concept that encapsulates the data and A class is an OO concept that encapsulates the data and

procedural abstractions that are required to describe procedural abstractions that are required to describe the content and behavior of some real world entity.the content and behavior of some real world entity.

► The only way to reach the attributes is to go through The only way to reach the attributes is to go through one of the methods.one of the methods.

► This achieves information hiding and reduces the This achieves information hiding and reduces the impact of side effects associated with changes.impact of side effects associated with changes.

► The methods are cohesive and the class tends to be The methods are cohesive and the class tends to be decoupled from other elements of a system. All of these decoupled from other elements of a system. All of these design characteristics lead to high-quality software.design characteristics lead to high-quality software.

Page 11: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Building a Building a ClassClass

class name

attributes:

operations:

attributes:

operations

Page 12: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Class Class HierarchyHierarchy

chairtable desk "chable"

instances of chair

furniture (super-class)

subclasses of thefurniture super-class

Page 13: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

MessagesMessages► Messages are the means by which objects interact.Messages are the means by which objects interact.► The behavior is accomplished when an operation is The behavior is accomplished when an operation is

executed.executed.► An operation within a sender object generates a An operation within a sender object generates a

message of the form:message of the form:

[destination, operation, parameters][destination, operation, parameters]► The receiver object responds to the message by The receiver object responds to the message by

first choosing the operation implements the first choosing the operation implements the message, executing this operation and then message, executing this operation and then returning control to the caller.returning control to the caller.

Page 14: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

MessagMessagesessender object

attributes:

operations:

receiver object

attributes:

operations:

message: [receiver, operation, parameters]

message: [sender, return value(s)]

Page 15: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

PolymorphismPolymorphism► It is a characteristic that greatly reduces the It is a characteristic that greatly reduces the

effort required to extend an existing OO system.effort required to extend an existing OO system.► Polymorphism enables a number of different Polymorphism enables a number of different

operations to have the same name.operations to have the same name.► For example: drawing different type of For example: drawing different type of

graphs( e.g. Line, Pie, Histogram )graphs( e.g. Line, Pie, Histogram )► It decouples objects from one another making It decouples objects from one another making

each more independent.each more independent.► General class graph and one subclass for each General class graph and one subclass for each

type.type.

Page 16: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Basic Principles of Object Basic Principles of Object OrientationOrientation

Object Orientation

Enca

psul

atio

n

Abs

trac

tion

poly

mor

phis

m

Hierarchy

Page 17: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Abstraction: exampleAbstraction: example

namefamily namebirth date

city

namefamily namebirth date

isSingle

namefamily namebirth date

RegistrationSystem

LoanSystem

Accommodate??System

Student in Real World

Page 18: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Encapsulation: exampleEncapsulation: example

Inventory System know how to insert a Inventory System know how to insert a voucher in Accounting System and not voucher in Accounting System and not more.more.

How a voucher insert in Accounting How a voucher insert in Accounting System is privateSystem is private

Accounting System

InventorySystem

Insert a voucher

Page 19: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Hierarchy: ExampleHierarchy: Example

Department

Account

Order

has-a

Works-inhas-a

DistrictManager

SalesManager

SalesPerson

Employee Personis-a

is-a

is-a

is-aSupervises

Supervises

A Semantic Network for SalesPerson

Page 20: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

PolymorphismPolymorphismShape

Darw()

Line

Darw()

Circle

Darw()

Page 21: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Oriented Object-Oriented AnalysisAnalysis

Page 22: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

IntroductionIntroduction► Object oriented analysis is based upon concept that we first Object oriented analysis is based upon concept that we first

learned in kindergarten: objects and attributes, classes and learned in kindergarten: objects and attributes, classes and members, wholes and parts.members, wholes and parts.

► To define all classes, the operations, the attributes, the To define all classes, the operations, the attributes, the relationships and the behavior the following tasks must be relationships and the behavior the following tasks must be done:done: Basic user requirements must be communicated between Basic user requirements must be communicated between

the customer and the software engineer.the customer and the software engineer. Classes must be identified.Classes must be identified. A class hierarchy must be specified.A class hierarchy must be specified. Object to object relationships should be represented.Object to object relationships should be represented. Object behavior must be modeled.Object behavior must be modeled. Above Tasks must be reapplied iteratively until the model Above Tasks must be reapplied iteratively until the model

is complete.is complete.► There is no universal agreement on the concepts that serve as There is no universal agreement on the concepts that serve as

a foundation for OOA.a foundation for OOA.

Page 23: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Conventional vs. OO Conventional vs. OO ApproachesApproaches► Structured Analysis (SA):Structured Analysis (SA):

takes a distinct input-process-output view of takes a distinct input-process-output view of requirements.requirements.

Data are considered separately from the Data are considered separately from the processes that transform the data.processes that transform the data.

System behavior tends to play a secondary System behavior tends to play a secondary role.role.

makes heavy use of functional decomposition. makes heavy use of functional decomposition.

Page 24: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Modeling DimensionsModeling Dimensions1.1. Identification/classification of entities.Identification/classification of entities.2.2. General-to-specific and whole-to-part General-to-specific and whole-to-part

entity relationshipsentity relationships3.3. Other entity relationshipsOther entity relationships4.4. Description of attributes of entitiesDescription of attributes of entities5.5. Large-scale model partitioningLarge-scale model partitioning6.6. States and transitions between statesStates and transitions between states7.7. Detailed specification for functionsDetailed specification for functions8.8. Top-down decompositionTop-down decomposition9.9. End-to-end processing sequencesEnd-to-end processing sequences10.10. Identification of exclusive servicesIdentification of exclusive services11.11. Entity communications (via messages or Entity communications (via messages or

events)events)

The modeling dimensions 8 and 9 are always present with SA.

Page 25: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

The OOA LandscapeThe OOA Landscape► Dozens of OOA method during the late 1980s and into the Dozens of OOA method during the late 1980s and into the

1990s are introduced.1990s are introduced.► Each of them proposed:Each of them proposed:

A process for the analysis of the product or systemA process for the analysis of the product or system A set of diagrams that evolved out of the process.A set of diagrams that evolved out of the process. A notation that enabled the software engineer to create the A notation that enabled the software engineer to create the

analysis model in a consistent manner.analysis model in a consistent manner.► The most widely use were:The most widely use were:

The Booch methodThe Booch method ( an evolutionary approach is maintained). ( an evolutionary approach is maintained). The Rumbaugh methodThe Rumbaugh method (Object modeling technique (OMT)) (Object modeling technique (OMT)) The Jacobson methodThe Jacobson method (OO Software Engineering (OOSE)) (OO Software Engineering (OOSE)) The Coad and Yourdon methodThe Coad and Yourdon method (One of the easiest) (One of the easiest) The Wirfs-Brock methodThe Wirfs-Brock method (do not make clear distinction (do not make clear distinction

between design and analysis tasks)between design and analysis tasks)

Page 26: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Generic Steps for OOAGeneric Steps for OOA1.1. Elicit customer requirements for the system.Elicit customer requirements for the system.

2.2. Identify scenarios for use-cases.Identify scenarios for use-cases.

3.3. Select classes and objects using basic requirements Select classes and objects using basic requirements as a guide.as a guide.

4.4. Identify attributes and operations for each system Identify attributes and operations for each system object.object.

5.5. Define structures and hierarchies that organize Define structures and hierarchies that organize classes.classes.

6.6. Build an object-behavior model.Build an object-behavior model.

7.7. Review the OO analysis model against use-cases or Review the OO analysis model against use-cases or scenarios.scenarios.

Page 27: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

A Unified Approach to OOAA Unified Approach to OOA► Grady Booch, James Rumbaugh and Ivar Jacobson Grady Booch, James Rumbaugh and Ivar Jacobson

combine the best features into a unified method called: combine the best features into a unified method called: Unified Modeling Language (UML)Unified Modeling Language (UML)

► UML allows a software engineer to express and analysis UML allows a software engineer to express and analysis model using a modeling notation that is governed by a model using a modeling notation that is governed by a set of Syntactic, Semantic, and Pragmatic rules.set of Syntactic, Semantic, and Pragmatic rules. The syntax tells us how the symbols should look and how they The syntax tells us how the symbols should look and how they

are combined. (Word in natural language)are combined. (Word in natural language) The semantics tells us what each symbols means and how it The semantics tells us what each symbols means and how it

should be interpreted. (Meaning of words in natural language)should be interpreted. (Meaning of words in natural language) The pragmatic rules define the intentions of the symbols through The pragmatic rules define the intentions of the symbols through

which the purpose of the model is achieved and become which the purpose of the model is achieved and become understandable. (The rules for constructing sentences that are understandable. (The rules for constructing sentences that are clear and understandable in natural language)clear and understandable in natural language)

Page 28: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Unified Modeling Language Unified Modeling Language (UML)(UML)

User model view.User model view. This view represents the system (product) from the This view represents the system (product) from the user’s (called “actors” in UML) perspective.user’s (called “actors” in UML) perspective.

Structural model view.Structural model view. Data and functionality is viewed from inside the Data and functionality is viewed from inside the system. That is, static structure (classes, objects, and relationships) is system. That is, static structure (classes, objects, and relationships) is modeled.modeled.

Behavioral model view.Behavioral model view. This part of the analysis model represents the This part of the analysis model represents the dynamic or behavioral aspects of the system. dynamic or behavioral aspects of the system.

Implementation model view.Implementation model view. The structural and behavioral aspects of The structural and behavioral aspects of the system are represented as they are to be built.the system are represented as they are to be built.

Environment model view.Environment model view. The structural and behavioral aspects of the The structural and behavioral aspects of the environment in which the system is to be implemented are represented.environment in which the system is to be implemented are represented.

UML analysis modeling focuses on the first two views of the system.UML analysis modeling focuses on the first two views of the system.UML design modeling addresses the other three views.UML design modeling addresses the other three views.

Page 29: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Domain AnalysisDomain Analysis► OO Analysis can occur at many different levels of OO Analysis can occur at many different levels of

abstraction:abstraction: At the business or enterprise levelAt the business or enterprise level At the business area levelAt the business area level At an application levelAt an application level

► OOA at the middle level called Domain Analysis.OOA at the middle level called Domain Analysis.► Domain Analysis is performed to create a library of Domain Analysis is performed to create a library of

reusable classes applicable to an entire category of reusable classes applicable to an entire category of applications.applications.

► Using a robust class library produces the system Using a robust class library produces the system faster, cheaper and more reliable.faster, cheaper and more reliable.

► But where did such a library come from? By But where did such a library come from? By applying domain analysis.applying domain analysis.

Page 30: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Domain Analysis Domain Analysis ProcessProcess

DOMAINANALYSIS

SOURCES OFDOMAIN

KNOWLEDGE

DOMAINANALYSIS

MODEL

technical literature

existing applications

customer surveys

expert advice

current/future requirements

class taxonomies

reuse standards

functional models

domain languages

• The goal: to find or create those classes that are broadly applicable, so that they may be reused.

• It can be viewed as an umbrella activity for the software process.

• The role of domain analyst is to design and build reusable components that maybe used by many people working on similar but not necessarily the same applications.

• Key inputs and outputs for the domain analysis process:

Page 31: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

The OOA ProcessThe OOA Process► The OOA process begins with an understanding The OOA process begins with an understanding

of the manner in which the system will be used of the manner in which the system will be used by:by: People, if the system is human-interactive. People, if the system is human-interactive. Machines, if the system is involved in Machines, if the system is involved in

process control.process control. Programs, if the system coordinates and Programs, if the system coordinates and

controls applicationscontrols applications► Once the scenario of usage has been defined, Once the scenario of usage has been defined,

the modeling of the software begins.the modeling of the software begins.► A series of techniques may be used to gather A series of techniques may be used to gather

basic customer requirements.basic customer requirements.

Page 32: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

UML: Use-Case DiagramUML: Use-Case Diagram

Page 33: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

CRC CRC ModelingModeling

class name:

class type: (e.g., device, property, role, event, ...)

class characterisitics: (e.g., tangible, atomic, concurrent, ...)

responsibilities: collaborators:

Page 34: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Guidelines for Allocating Guidelines for Allocating Responsibilities to ClassesResponsibilities to Classes

1. System intelligence should be evenly distributed. 1. System intelligence should be evenly distributed.

2. Each responsibility should be stated as generally as 2. Each responsibility should be stated as generally as possible. possible.

3. Information and the behavior that is related to it 3. Information and the behavior that is related to it should reside within the same class. should reside within the same class.

4. Information about one thing should be localized with a 4. Information about one thing should be localized with a single class, not distributed across multiple classes.single class, not distributed across multiple classes.

Page 35: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

UML: Class DiagramsUML: Class Diagrams

Generalization-specialization Composite aggregates

Page 36: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

UML: UML: Package Package ReferenceReference

Page 37: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Relationships between Relationships between ObjectsObjects

Page 38: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Behavior ModelObject-Behavior Model1. Evaluate all use-cases to fully understand the sequence of 1. Evaluate all use-cases to fully understand the sequence of interaction within the system.interaction within the system.

2. Identify events that drive the interaction sequence and 2. Identify events that drive the interaction sequence and understand how these events relate to specific objects.understand how these events relate to specific objects.

3. Create an event trace [RUM91] for each use-case.3. Create an event trace [RUM91] for each use-case.

4. Build a state transition diagram for the system4. Build a state transition diagram for the system

5. Review the object-behavior model to verify accuracy and 5. Review the object-behavior model to verify accuracy and consistencyconsistency

Page 39: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

UML: State TransitionUML: State Transition

Page 40: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

UML: Event TraceUML: Event Trace

Page 41: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Oriented Object-Oriented DesignDesign

Page 42: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

IntroductionIntroduction► OOD transforms the analysis model created using OOA into OOD transforms the analysis model created using OOA into

a design model that serves as a blueprint for software a design model that serves as a blueprint for software construction.construction.

► OOD results in a design that achieves a number of different OOD results in a design that achieves a number of different levels of modularity.levels of modularity.

► Subsystems: Major system components.Subsystems: Major system components.► Objects: Data and the operations.Objects: Data and the operations.► Four important software design concepts:Four important software design concepts:

AbstractionAbstraction Information HidingInformation Hiding Functional IndependenceFunctional Independence ModularityModularity

► OOD provides a mechanism that enables the designer to OOD provides a mechanism that enables the designer to achieve all four with less complexity and compromise.achieve all four with less complexity and compromise.

Page 43: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

responsibilitiesdesign

messagedesign

class and objectdesign

subsystemdesign

Object-Oriented Object-Oriented DesignDesign•The subsystem layer: Representation

of each of the subsystems that enable the software to achieve its customer defined requirements.

•The class and object layer: The class hierarchies, (generalization) and representation of objects.

•The message layer: The design details of communication of each object with its collaborators. (external and internal interfaces)

•The responsibilities layer: Data Structure and algorithmic design for all attributes and operations.

Page 44: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object-Oriented DesignObject-Oriented Design► The design pyramid focuses exclusively on the The design pyramid focuses exclusively on the

design of a specific product or system.design of a specific product or system.► Another layer of design which forms the foundation Another layer of design which forms the foundation

on which the pyramid rests, exists. on which the pyramid rests, exists. ► The foundation layer focuses on the design of The foundation layer focuses on the design of

domain objects.domain objects.► Domain objects play a key role in building the Domain objects play a key role in building the

infrastructure for the OO system by providing infrastructure for the OO system by providing support for:support for: Human/computer interface activities,Human/computer interface activities, Task management,Task management, Data management.Data management.

Page 45: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

OOA and OOA and OODOOD

Object-relationship

model

Object-BehaviorModel

CRCIndex Cards

Attributes, operations,collaborators

THE ANALYSIS MODEL

responsibilitiesdesign

messagedesign

Class and objectdesign

subsystemdesign

THE DESIGN MODEL

Use cases

Page 46: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Generic Components for Generic Components for OODOOD

► Problem domain component—the subsystems that are Problem domain component—the subsystems that are responsible for implementing customer requirements responsible for implementing customer requirements directly;directly;

► Human interaction component —the subsystems that Human interaction component —the subsystems that implement the user interface (this included reusable GUI implement the user interface (this included reusable GUI subsystems);subsystems);

► Task Management Component—the subsystems that are Task Management Component—the subsystems that are responsible for controlling and coordinating concurrent responsible for controlling and coordinating concurrent tasks that may be packaged within a subsystem or tasks that may be packaged within a subsystem or among different subsystems;among different subsystems;

► Data management component—the subsystem that is Data management component—the subsystem that is responsible for the storage and retrieval of objects.responsible for the storage and retrieval of objects.

Page 47: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Process Flow for OODProcess Flow for OOD

Page 48: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

System Design ProcessSystem Design Process• • Partition the analysis model into subsystems.Partition the analysis model into subsystems.

• • Identify concurrency that is dictated by the problem.Identify concurrency that is dictated by the problem.

• • Allocate subsystems to processors and tasks.Allocate subsystems to processors and tasks.

• • Develop a design for the user interface.Develop a design for the user interface.

• • Choose a basic strategy for implementing data management.Choose a basic strategy for implementing data management.

• • Identify global resources and the control mechanisms required Identify global resources and the control mechanisms required to access them.to access them.

• • Design an appropriate control mechanism for the system, Design an appropriate control mechanism for the system, including task management.including task management.

• • Consider how boundary conditions should be handled.Consider how boundary conditions should be handled.

• • Review and consider trade-offs.Review and consider trade-offs.

Page 49: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

System System DesignDesign

requestclientsubsystem

contract

contract contract

request

request

serversubsystem

peersubsystem

peersubsystem

Page 50: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Subsystem Subsystem ExampleExample

assign to zonetest status

request for alarm notificationperiodic check-inrequire for configuration update

request for statusControlpanel

subsystem

Sensorsubsystem

Centralcommunication

subsystem

request for system statusspecification of type of alarm

periodic status check

Page 51: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Subsystem Design CriteriaSubsystem Design Criteria

• The subsystem should have a well-defined interface through which all communication with the rest of the system occurs.

• With the exception of a small number of “communication classes,” the classes within a subsystem should collaborate only with other classes within the subsystem.

• The number of subsystems should be kept small.

• A subsystem can be partitioned internally to help reduce complexity.

Page 52: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Object Object DesignDesign► A A protocol descriptionprotocol description establishes the interface of an establishes the interface of an

object by defining each message that the object can object by defining each message that the object can receive and the related operation that the object receive and the related operation that the object performs performs

► An An implementation descriptionimplementation description shows implementation shows implementation details for each operation implied by a message that is details for each operation implied by a message that is passed to an object. passed to an object. information about the object's private partinformation about the object's private part internal details about the data structures that internal details about the data structures that

describe the object’s attributesdescribe the object’s attributes procedural details that describe operationsprocedural details that describe operations

Page 53: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Design Design PatternsPatterns... you’ll find recurring patterns of classes and

communicating objects in many object-oriented systems. These patterns solve specific design problems and make object-oriented design more flexible, elegant, and ultimately reusable. They help designers reuse successful designs by basing new designs on prior experience. A designer who is familiar with such patterns can apply them immediately to design problems without having to rediscover them.

Gamma and his colleagues [GAM95]

Page 54: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

Design Pattern Design Pattern AttributesAttributes► The design pattern name is an abstraction that The design pattern name is an abstraction that

conveys significant meaning about it applicability and conveys significant meaning about it applicability and intent. intent.

► The problem description indicates the environment The problem description indicates the environment and conditions that must exist to make the design and conditions that must exist to make the design pattern applicable. pattern applicable.

► The pattern characteristics indicate the attributes of The pattern characteristics indicate the attributes of the design that may be adjusted to enable the pattern the design that may be adjusted to enable the pattern to accommodate into a variety of problems. to accommodate into a variety of problems.

► The consequences associated with the use of a design The consequences associated with the use of a design pattern provide an indication of the ramifications of pattern provide an indication of the ramifications of design decisions.design decisions.

Page 55: Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.

ReferenceReference

►Software Engineering Book, Roger S. Software Engineering Book, Roger S. Pressman, Chapters 20,21,22.Pressman, Chapters 20,21,22.


Recommended