1
Chap 5. OO Analysis and Design
서울대학교 컴퓨터공학부Internet Data Base Lab
교수 김형주
OBJECT-ORIENTATION by Khoshafian and Abnous
2
Overall Pictures of OO SW Design
Object-Oriented Software Engineering History of Software Engineering Designing Reusable Classes
Object-Oriented Analyasis / Design E-R Modeling / Semantic Modeling Booch method, Rambaugh OMT, Scheller-Mellor method
Unified Modeling Method (UML)
3
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
4
1. Introduction(1)
The OO concepts are used throughout the process requirement specification ( problem definition ) analysis ( what the product in question is ) design ( how it should be built )
5
Introduction (2)
Object-orientedConcepts
ADT
OODesign
OODesign
Object-OrientedProgramming
Object-OrientedProgramming
OOAnalysis
Real-world Problem
Inheritance
Identity
6
Modeling SW Development Processes (1)
RequirementSpecification
AnalysisAnalysis
DesignDesign
CodingCoding
TestTest
ProductionProduction
Waterfall model(W. Royce, 1970)
A “traditional” software development “waterfall” process
7
Modeling SW Development Processes (2)
Dynamic and iterative nature of OO Development In object-oriented development, third-party
“components” or class hierarchies are integrated
Redesign an entirely new class structure, as the incrementally extended “forest” becomes unmanageable
8
RequirementRequirement
OODesign
OODesign
OOProgramming
OOProgramming
OOAnalysis
OOAnalysis
SC
ProposedEnhancements
NewPossibilities Performance
Issues
New Third-partyClass Hierarchies
Client/ServerComputing
New Technologies
ComponentObject Computing
Innovationsin Analysisand Design
The dynamic & iterative nature of OO development
9
Object-Oriented Analysis and Design
OOA(Object-Oriented Analysis) - what is used to provide a detailed description of a system
using object-oriented notation, concepts, and methodology
OOD(Object-Oriented Design) - how concentrates on providing the blueprint for
implementation
Design-before-Implementation Software Engineering
10
OOA/OOD Methodologies (1)
Shlaer and Mellor OOA/OOD ( Shlaer and Mellor, 1988, 1992 )
Wirfs-Brock Responsibility Driven Design ( Wirfs-Block and Wilkerson, 1989 )
Coad and Yourdon OOA/OOD ( Coad and Yourdon, 1991a, 1991b )
Object Behavior Analysis ( Rubin and Goldberg, 1992 )
Objectory method ( Jacobson et al. , 1992 )
11
OOA/OOD Methodologies (2) Martin and Odell OOA/OOD
( Martin and Odell, 1993 ) Fusion
( Coleman et al. , 1994 ) Booch OOA/OOD
( Booch, 1994 ) Rumbaugh Object Modeling Technique(OMT)
( Rumbaugh et al. , 1994 )
UML (Unified Modeling Language) !!!
12
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
13
2. Inventions, Aspirations, Requirements
Requirements The system functionality (by what, for whom) The user/machine/system interaction The environment (hw/sw platform, network)
The observation: Feedback and prototyping can further enhance and clarify the system
SW development methodology should consider the above issue!
14
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
15
3. Object-Oriented Analysis (1)
Booch’s definition of OOA A method of analysis that examines requirements from the per
spective of classes and objects found in the vocabulary of the problem domain.
What What is the application being built from the end user’s perspec
tive?
16
Object-Oriented Analysis (2)
Programmers must identify Entities, relationships, and operations Aspects of the behavior of entities
static( definition of classes ) dynamic( interaction between objects, state transition,
and so on )
All operations All constraints
Classification The identification of the classes that contain
objects similar to one another
17
Object-Oriented Analysis (3)
Major Findings of OOA
1. Objects and classes2. Object attributes3. Object and Class relationships
Inheritance Relationships One-to-One, One-to-Many, Many-to-Many
Relationships
18
PersonPerson
EmployeeEmployee StudentStudent
SalesPersonSalesPerson SecretarySecretary
MultimediaMultimedia
RasterRasterGraphicGraphic
ImagesImagesVideoVideoAudioAudio
< A number of inheritance relationships >
19
SourceCode
N/1
Relationship
WorkFlow CreatedBy Person
Policy of Department Department
Node
HasLink
Link
DestinationNode
HasNode
1
N
11
N N
1
N1
N
N
N
1/N
Entity
< Entity Relationship for a workflow schema >
20
Object-Oriented Analysis (4)
Major Findings of OOA 4. Operations on objects and classes
Workflow
CreatorWorkflow
NumberOfActiveWorkflows
ContainsNode (Rule)
Boolean
Person
Integer
< A number of methods associatedwith the class Workflow >
21
Object-Oriented Analysis (4)
Major Findings of OOA
5. Dynamic concepts State transition diagrams Data flow diagrams Timing diagrams
ImmediateState
ImmediateState
ImmediateState
ImmediateState
Event orAction
State transition
End orResult State
StartState
22
User
Process
Process
Process
Process
1 2
3 4
Storage 2
Storage 1
Data 1
Data 2
Data 3
Data flow
23
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
24
4. Defining Object-Oriented Design (1)
Berard’s definition of OOD Object-oriented design is that portion of the sw lifecycle
that prepares definitions as to how the system will accomplish its requirements.
The models prepared in analysis are either refined, or transformed, into design models that depict the physical nature of the software product
25
Defining Object-Oriented Design (2) The goal of design
To produce the structure of detailed implementation specifications
Analysis: requirement specification Design: implementation specification
The design phase A coarse-grained design phase A more detailed design phase
26
Coarse-Grained Design (1)
Coarse-Grained Approach is to break the system into smaller subsystems subsystems could be supported by different OOA
and OOD methods often this approach takes the form of layered
systems & architectures with clean interfaces between the layers ( I.e., Client/Sever coarse-grained architecture )
27
Coarse-Grained Design (2)
The coarse-grained design phase Identification of all the subsystems or class
categories involved in the system Mapping of various categories onto different
processes and processors Identification of the third-party software modules Identification of the various add-on components
28
GUI & Enviroment
Workflow Alerter, In/Out-Box, etc.
Workflow Design Tool
Workflow Activation Tool
Workflow Tracking-Status
Workflow Manager Services
Workflow Interpreter
Route Manager / Rule Manager
Workflow Tracking Manager
Workflow User & Group Manager
Workflow Administrator Manager
DBMS E-Mail & Message Service
Client Site
Server Site
< Coarse-Grainedarchitecture of a Workflow system >
29
More Detailed Design
More Detailed Design the next phase of coarse-grained design, in the
development life cycle each class category is designed in great detail all the structures, operations, object
interactions, and dynamic concepts of the system are specified here
30
Design Specification (More Detailed)
Subsystems or class categories Class definition Class relationships Object diagrams and object relationships State transition Timing diagrams Designing algorithms Physical compilation units
31
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
32
5. Semantic and E-R Modeling
DB structures and DB design ER modeling has been one of the most
successful paradigms for designing types and objects
ERs are the forerunners of more powerful semantic data models
ER model: Peter Chen, MIT, 1976
33
Semantic Data Modeling
Goal: to model the real world as closely as possible do not incorporate behavioral abstraction model structural abstraction
Design tools for DB Assigning semantics: Node and Link Many ideas from AI Knowledge Representation Semantic Data Models
ER(Entity-Relationship) Model (Chen, 1976) GSM(Generalized Semantic Model, (Hull and King, 1987) And many many others
34
A Printable Entity Type
An Abstract Entity Type
Entity Types That AreSubtypes of OtherEntity Types
Aggregation(Cartesian Product)Constructed Type
GroupingConstructed Type
Single-valued Attribute
Multivalued Attribute
IS-A Inheritance
Element ofConstructed Type
Node Typesin GSM
Link Typesin GSM
tuple
set
35
EmployeeSalary
lastmiddle
first
PersonAge
Age
Name
NAME
AddressPerson
Department
OfficeWorker
Department
Salary
Account
SalesPerson
Order
Orders
Accounts
Address
A GSM model for thesales office automation
36
Entity Relationship Modeling (1)
Entity type A set of objects(entities)
Attributes A function that can apply to an entity
Relationship Cardinality (one-to-one, many-to-one, many-to-
many)
37
Entity Relationship Modeling (2)
Implementation steps of RDB applications
1. Identify Entity and Relationship of problem domain (Drawing ER diagrams)2. Merge views from different perspectives3. Map an ER diagram onto a DB schema (a set of
tables)4. Physical design (Keys, Index, Replication)
38
WorksIn
HasAccounts
HasOrders
Account Order
SalesPerson Department
Age
SalaryName
Address Zip
State
City
StName
StNumber
LivesAt
DeptName Budget
N
N
111
N
M N
< An ER model for the sales office automation >
39
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
40
6. Overview of Existing Methodologies
Issues for Selecting OO Methodology
1. Software Development Process2. Notations and Diagrams3. Application Domain (General vs Specific)4. Language Constructs 5. Availability of Tools
41
Booch’s OOA and OOD (1)
Grady Booch, 1994 Rational Rose/C++
The major steps using Booch’s method Requirement analysis (RA) Domain analysis (OOA) Design (OOD)
42
Booch’s OOA and OOD (2)
Requirement Analysis use-case ( Jacobson et al. , 1992 )
Domain Analysis Identification of the classes Identification of relationships Identification of object diagrams Identification of attributes and operations Identify inheritance
43
USE CASE What is Use Case?
Scenario between System and User Specific pattern of using System
Use Case Making new schedule Notifying important
promise Showing someone’s
public schedule
Show Calendarfor new schedule
Notify important promise
Show someone’spublic schedule
Scheduler
Use Case Diagram
Actor2
Actor1
44
Candidate
Manager
Text
Person
Employee
University
< Booch OOA: Identification of the classes in the problem >
45
Candidate
Manager
Text
Person
Employee
University
Interview
Propose
Biography
ReferencesUniversities
Attended
1
N
N
M
1
N
11
N
1
Interview
Personnel
DepartmentManager
3. Make Offer (New Candidate)
2. Linked by Most (New Candidate)1. Qualifies
(New Candidate)
1. Manager qualifies2. Most people in department approve3. An offer is made
< Class diagrams showing attributes & inheritance > < Identification of object diagrams >
Booch OOA
46
Candidate
Candidate
Name : StringDate of Birth : DateSocial Security : String
HighestDegree( )NumberOfYearsWorkExperience( )
Person
Employee Student
SalesPerson Graduate
CorporateHiring Process
DepartmentHiring Process
ManagerHiring Process
< Attributes & operations for class Candidates >
<Inheritance hierarchies in Booch notation>
Booch OOA
47
Booch’s OOA and OOD (3)
The steps of Booch’s OOD Class categories for major components of the architec
ture Detailed design Processes and devices Modules
48
OCRProcessingComputer
DatabaseStorageEngine
Full-TextRetrievalEngine
FAXStation
ScannerStation
StorageSubsystem
WorkflowUser Interface
WorkflowSystem
Operating SystemGraphicalInterface
WorkflowDatabaseManager
ElectronicMessaging
Class categories for a workflow system
Some of the devices and processorsin a document imaging system
Booch’s OOD
49
The OMT OOA and OOD
James Rumbaugh, 1991 Object-Oriented Analysis (OOA)
Problem Statement Object Model -- object diagram Dynamic Model -- event trace, state transition diagram Functional Model -- data flow diagram
Object-Oriented Design (OOD) System Design Object Design
50
Object Model
The definitions of Object Model the object model describes the structure of the objec
ts in a system --- their identity, relationships to other objects, and attributes.
( Rumbaugh et al. , 1991 ) Object Diagram
captures the notation for objects
51
List ChildrenSpouseChange Address...
OMT - Object Diagrams
Person
Name: StringDate of Birth: Date...
Person
Student Employee
SalesPerson
MarketingPerson
Class 1 Class 2
Manager Department
Employee Department
Person Address
SalaryRole
Lives-in
Works-in
Class with attributesand operations
Inheritance/generalizationhierarchies
Relationships orAssociations
52
OMT - Dynamic Model
Event & state Event trace scenario
objects, messages
State transition diagram events, states
53
Candidate SecretaryHiring
Manager
Sends Resume
Acknowledge
Forwards Resume
Instructs Setting UpInterview
Calls to Set Up Interview
RespondsSets Up Interview
Schedule
Accepts InterviewSchedule
OMT dynamic modeling: Event traceto set up interview for hiring a candidate
54
AnalyzeNext Potential
Trade
Search Libraryon Company
PerformTrade
PerformStock/Company
Analysis
Initiate:
Recommend
Company
LibrarySearch forCompany X
InitiateAnalysis
OMT dynamic modeling: State transition for trade transactions
55
OMT - Functional Model(1)
Data flow diagram Nodes in data flow diagrams
Processes Accept values, process, output
Data stores Store data
Actors Objects producing and consuming values
56
OMT - Functional Model (2)
FAX ImageStore
DocumentStorage
AnnotateFAX Image
PrintProcess andDigital FAXDocument
FAXMachine
Data flow diagram in OMT
fax fax
image image
annotated
57
Shlaer and Mellor OOA and OOD (1)
Lawrence Berkeley Lab., 1979 most applications used for the developed OOA method
were for larger industrial-strength real-time applications
OOA Partitioning into domains Objects and Information Model Lifecycles and State Transition Diagrams Object Communication Diagram Action Data Flow Diagrams
OOD
58
Hiring NewEmployees
RequirementTracking
InterviewProcessing
Automated HiringUser Interface
Departmentand Employees’
Approval Process
ServerArchitecture
DocumentImaging
Networking Programming
< Domain in an automated hiring process >
Shlaer & Mellor OOA: Partitioning into Domains
59
Shlaer and Mellor OOA and OOD (2)
Objects and Information Model Objects
Attributes Identifiers cf.) key in RDB
Object relationships One-to-one, one-to-many, many-to-many Conditional, unconditional Inheritance relationships
60
1. PERSON (P) * SSN * Name - Date of Birth - Nationality - Marital Status ……....
(1:1)C
(1:1c)C C
(1c:1c)
C
C
C
(1:M)(1c:M)(1:Mc)
C(1c:Mc)
(M:M)C
C C(M:Mc)
(Mc:Mc)
< “objects” & their attributes >
< Relationship links in Shlaer-Mellor >
< Inheritance hierarchies in Shlaer-Mellor >
Shlaer & Mellor OOA: Object and Information Model
61
Shlaer and Mellor OOA and OOD (3)
Lifecycles and State Transition Diagrams most objects in the real world go through life
cycle due to events that occur, objects can go one
stage(state) to the other
62
1.Waiting to Receive FAX
2.Establishing Protocol
3.Receiving FAX
4.Pringting Report
Phone RingsF1:FAX Answers Phone
Starting TransmissionF2:FAX Machine Is Receiving FAX Pages
Terminating TransmissionF3:FAX Machine Indicates Completion of Transmission
State transitionfor a FAX machinein the Shlaer-Mellor
notation
Shlaer & Mellor OOA: State transition diagram
63
Shlaer and Mellor OOA and OOD (4)
Object Communication Diagram (OCD) Capture the interaction between various
objects and state models for the complete system
Abstraction of the whole system
Statemodel
External Object event
64
Object Communication for scanning and OCR-ing images
ErrorsUser at
Scan StationOCR
SystemOCR
Zoned AreaScanImage Scan Completed
and Displayed
Start Scanning
Error Conditions
Rescan
DisplayImage
Create Text Window
Rec
og
niz
ed T
ext
Display Text Stream
ScanningSoftware
Scanner
WindowDisplaying
ImageText Window
Shlaer & Mellor OOA: Object Communication Diagram
65
Shlaer and Mellor OOA and OOD (5)
Action Data Flow Diagram Processes Stores Data flows Control flows
66
Shlaer-Mellor process model supports control as well as data flow
Process 1
Process 2 Process 3
True
False
StorageDate
Data
Process 1
Process 2
Data Control
Schlaer & Mellor OOA: Action Flow Diagrams
67
Shlaer and Mellor OOA and OOD (6)
OO Design in Shlaer and Mellor Architecture domain
Supporting state machines and timers A main program, the architecture classes, the application classes Class diagrams, inheritance diagrams Class structure charts
Internal structure of the code in the operations of the class Dependency diagrams
Client/Server relationships between classes OODLE(Object-Oriented Design Language)
68
Contents
1. Introduction2. Inventions, Aspirations, and Requirements3. Object-Oriented Analysis4. Defining Object-Oriented Design5. Semantic and ER Modeling6. Overview of Existing Methodologies Booch method Rambaugh OMT method Shlaer and Mellor method
69
Summary
OOA/OOD Methodologies OOA - what OOD - how Semantic data model ER - popular in DB application design Booch OOD Rambaugh OMT Shlaer-Mellor Method
Top Related