Beruflich Dokumente
Kultur Dokumente
Chapter 8
Part 2: Design Methodology
Object-Oriented Modeling and Design
Byung-Hyun Ha
bhha@pusan.ac.kr
Lecture Outline
Introduction
Problem Statement
Object Modeling
Dynamic Modeling
Functional Modeling
Adding Operations
Iterating the Analysis
Introduction
Analysis phase
Devising a precise, concise, understandable, and correct model
of the real-world
Understand the requirements and the real-world environment
Purpose of object-oriented analysis
To model the real-world system so that it can be understood
To do this, we must
• examine requirements, analyze their implication, and restate them
rigorously; and
• abstract important real-world features first and defer small details
until later
Successful analysis model
• states what must be done, without restricting how it is done; and
• avoids implementation decisions
Introduction
Overview of analysis process
Introduction
Importance of each model (O/D/F) depends on the
problem
Almost all problems have useful object models derived from real-
world entities
Problems concerning interactions and timing, such as user
interfaces and process control, have important dynamic models
Problems containing significant computation, such as compilers
and engineering calculations, have important functional models
Analysis cannot always be carried out in rigid
sequence
Large models are built up iteratively
Analysis is not a mechanical process
The analyst must communicate with the requestor to clarify
ambiguity and misconceptions
Problem Statement
Problem statement
states what is to be done and not how it is to be done
• Problem scope, what is needed, application context, assumptions,
and performance needs
should be a statement of needs, not a proposal for a solution
is just starting point for understanding problem, not an immutable
documents
Task of analyst
To resolve ambiguity, incompleteness, and inconsistency
To separate the true requirements from design and
implementation decisions disguised as requirements
To work with the requestor to refine the requirements so they
represent the requestor’s true intent
If you do exactly what the customer asked for, but the result does not
meet the customer’s real needs, you will be probably blamed anyway!
Problem Statement
Example problem statement
Section 8.3, page 151
Object Modeling
Object model precedes other models, because
static structure is usually better defined,
less dependent on application details,
more stable as the solution evolves, and
easier for humans to understand
Information for the object model comes from
the problem statement,
expert knowledge of the application domain, and
general knowledge of the real world
Object diagrams promote
communication between computer professionals and application-
domain experts
Object Modeling
Object model construction steps
Identify objects and classes
Prepare a data dictionary
Identify associations (including aggregations) between objects
Identify attributes of objects and links
Organize and simplify object classes using inheritance
Verify that access paths exist for likely queries
Iterate and refine the model
Group classes into modules
Operations
Add operations to classes later as a by-product of constructing
the dynamic and functional models
Object Modeling
Identifying object classes
Not all classes are explicit in the problem statement; some are
implicit in the application domain or general knowledge
Don’t be too selective; write down every class that comes to mind
Classes often correspond to nouns; for example, in a statement
“a reservation system to sell tickets to performance at various
theaters” tentative classes would be Reservation, System, Ticket,
Performance, and Theater
Don’t worry much about inheritance or high-level classes
Object Modeling
Identifying object classes
ATM classes extracted from problem statement nouns