DEV475 Mastering Object-Oriented Analysis and Design with
UML 2.0
Student Guide, Volume 1
IBM Rational University
DEV475 Mastering Object-Oriented Analysis and Design with
UML 2.0
Student Guide, Volume 1
Part No.
IBM Corporation
Rational University
DEV475 Mastering Object-Oriented Analysis and Design with UML 2.0
Student Manual, Volume 1
Version 2004.06.00
June 2004
Copyright © International Business Machines Corporation, 2004. All rights reserved.
This document may not be reproduced in whole or in part without the prior written permission of
IBM.
The contents of this manual and the associated software are the property of Rational Software and/or
its licensors, and are protected by United States copyright laws, patent laws, and various international
treaties. For additional copies of this manual or software, please contact Rational Software.
IBM and the IBM logo are trademarks or registered trademarks of IBM Corporation, in the United
States, other countries or both.
Rational, the Rational logo, ClearQuest, ClearCase, ClearCase LT, ClearCase MultiSite, Unified
Change Management, Rational Developer Network, Rational Rose, Rational XDE, Purify, PureCoverage, Rational Unified Process, ClearDDTS, and Quantify are trademarks or registered trademarks of
International Business Machines Corporation in the United States, other countries or both.
Microsoft Visual Basic, Windows NT, Windows 2000, Windows 95/98, Windows XP, Microsoft Word,
Windows Explorer, DOS, PowerPoint, and Visual SourceSafe, among others, are trademarks or registered trademarks of Microsoft Corporation.
Java and all Java-based marks, among others, are trademarks or registered trademarks of Sun Microsystems in the United States, other countries or both.
UNIX is a registered trademark of The Open Group in the United States, other countries or both.
Other company, product and service names may be trademarks or service marks of others.
Printed in the United States of America.
This manual prepared by:
IBM Rational Software
18880 Homestead Road
Cupertino, CA 95014-0721
USA
Contents
Module 0 About This Course
Course Objectives.......................................................................................... 0-3
Prerequisites .................................................................................................. 0-6
Rational University Curriculum....................................................................... 0-7
Module 1 Best Practices of Software Engineering
Practice 1: Develop Iteratively ....................................................................... 1-6
Practice 2: Manage Requirements .................................................................. 1-7
Practice 3: Use Component Architectures ...................................................... 1-8
Practice 4: Model Visually............................................................................ 1-10
Practice 5: Continuously Verify Quality ........................................................ 1-12
Practice 6: Manage Change ......................................................................... 1-14
Module 2 Concepts of Object Orientation
Four Principles of Modeling ........................................................................... 2-4
Representing Classes in the UML.................................................................. 2-12
Class Relationships....................................................................................... 2-14
What is a Structured Class? .......................................................................... 2-21
What Is an Interface? ................................................................................... 2-29
What is a Port? ............................................................................................ 2-33
Review ........................................................................................................ 2-39
Module 3 Requirements Overview
What Is System Behavior? .............................................................................. 3-8
Use-Case Specifications ............................................................................... 3-14
What Is an Activity Diagram? ....................................................................... 3-17
Glossary....................................................................................................... 3-21
Supplementary Specification ........................................................................ 3-24
Review ........................................................................................................ 3-32
Module 4 Analysis and Design Overview
Analysis Versus Design ................................................................................... 4-6
Analysis and Design Workflow ..................................................................... 4-12
Review ........................................................................................................ 4-19
Module 5 Architectural Analysis
Architectural Analysis Overview ..................................................................... 5-4
Package Relationships: Dependency .............................................................. 5-8
Patterns and Frameworks ............................................................................. 5-11
What Are Stereotypes?................................................................................. 5-18
Architectural Mechanisms: Three Categories ................................................ 5-22
What Are Key Abstractions? ......................................................................... 5-30
The Value of Use-Case Realizations.............................................................. 5-35
Review ........................................................................................................ 5-39
Module 6 Use-Case Analysis
Use-Case Analysis Overview .......................................................................... 6-4
Use-Case Analysis Steps ................................................................................. 6-8
Find Classes from Use-Case Behavior ........................................................... 6-12
Distribute Use-Case Behavior to Classes ....................................................... 6-27
Describe Responsibilities.............................................................................. 6-37
Association or Aggregation? .......................................................................... 6-46
What Are Roles? .......................................................................................... 6-47
Unify Analysis Classes .................................................................................. 6-57
Review ........................................................................................................ 6-62
Acknowledgments
The development of this course was made possible with the help of many individuals, but I would
particularly like to thank the following for their exceptional participation:
Alex Kutsick of Rational University for his course development standards, instructional design
expertise, and attention to detail. Alex has contributed greatly in ensuring that there is a highlevel of consistency throughout this course.
Gary Bastoky of Rational University for his graphics knowledge and support.
The students at Lockheed/Martin who participated in the beta presentation of this course:
Markku Kotiaho, Michael Wells, James Lowe, Alicia Kohner, Elizabeth Grant, Huy Nguyen,
Kevin Carpenter, Michael Saniei, Mark Campbell, Ron Piwetz, Eric Miller, and Nhan Do.
Last but certainly not least, DeAnna Roberts of the Rational University production team for her
logistical support.
June, 2004
Michael Lang
Rational University Product Manager/ OO Curriculum
Works Cited
The following sources were used to develop this courseware. When quoted directly, we cite the source
after the quoted passage. For all other uses, we respectfully acknowledge below the authors’
contributions in the development of this courseware.
The Deadline: A Novel About Project Management, Tom DeMarco, Dorset House Publishing,
1997.
Dictionary of Object Technology: The Definitive Desk Reference, Donald G. Firesmith and Edward
M. Eykholt, Prentice Hall, 1995.
Meta Fax, 09/15/97.
Object Technology: A Manager’s Guide, David A. Taylor, Addison-Wesley, 1999.
Pattern-Oriented Software Architecture: A System of Patterns, Frank Buschman et al., John Wiley &
Sons, 1996.
The Rational Unified Process, An Introduction, Phillippe Kruchten, Addison-Wesley, 1999.
The UML Bible, Tom Pender, Wiley Publishing, Inc., 2003.
UML Distilled – Third Edition, Martin Fowler, Addison-Wesley, 2004.
UML Toolkit, Hans-Erik Eriksson, Magnus Penker, Brian Lyons, David Fado, Wiley Publishing, Inc.,
2004.
The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar Jacobson,
Addison-Wesley, 1999.
The Unified Modeling Language Reference Manual – Second Edition, James Rumbaugh, Ivar
Jacobson, Grady Booch, Addison-Wesley, 2004.
Visual Modeling with Rational Rose and UML, Terry Quatrani, Addison-Wesley, 1998.
► ►
►
Module 0
About This Course
®
IBM Software Group
Mastering Object-Oriented Analysis and Design
with UML 2.0
Module 0: About This Course
1
Topics
Course Objectives ................................................................................................ 0-3
Prerequisites......................................................................................................... 0-6
Rational University Curriculum ............................................................................. 0-7
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
0-1
Mastering Object-Oriented Analysis and Design with UML 2.0
Introductions
Introductions
Your organization
Your role
Your background, experience
Object technology experience
Software development experience
Implementation language experience
Your expectations for this course
2
0-2
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 0 - About This Course
Course Objectives
Course Objectives
Upon completion of the course, participants
will be able to:
Apply an iterative, use case-driven,
architecture-centric process to the development
of a robust design model
Use the Unified Modeling Language (UML) to
represent the design model
Apply Object-Oriented (OO) concepts:
abstraction, encapsulation, inheritance,
hierarchy, modularity, and polymorphism to the
development of a robust design model
3
During this course, you will be introduced to the concepts, process, and notation for
developing a design model. You will be using the Rational Unified Process Analysis
and Design workflow as your framework. These concepts can also be applied within
any software development process.
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
0-3
Mastering Object-Oriented Analysis and Design with UML 2.0
Course Objectives (continued)
Course Objectives (continued)
Upon completion of the course, participants
will be able to:
Describe the different views of software
architecture, key mechanisms that are defined
in support of that architecture, and the effect of
the architecture on the produced design
Define basic design considerations, including
the use of patterns
4
The concentration will be on those activities that are performed by the objectoriented designer. Architectural concepts will be introduced and discussed, as they
drive the design, but this is not an architecture course.
0-4
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 0 - About This Course
Intended Audience
Intended Audience
Intended Audience
Practitioners who want a basic explanation of
Object-Oriented Analysis and Design (OOAD)
concepts, as well as hands-on practical
experience in applying the techniques
Analysts, designers, software developers, and
system engineers
5
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
0-5
Mastering Object-Oriented Analysis and Design with UML 2.0
Prerequisites
Prerequisites
Some experience applying the following
techniques in a software development
environment
An exposure to object technology including, how to:
•
•
•
•
Read a use-case model
Add classes, objects, associations and how to create simple
interaction and class diagrams
Find classes and distribute class behavior
Distinguish between the UML Analysis class stereotypes:
boundary, control, and entity
Prerequisites can be achieved through attendance in
“Essentials of Visual Modeling with UML” or
equivalent experience
6
0-6
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 0 - About This Course
Rational University Curriculum
Rational University Curriculum
Curriculum Flow:
Designer
Instructor-led
Web-based
Optional
Path 1
DEV110
Principles of
Modeling
DEV111
Principles of
UC Modeling
with UML
DEV112
Principles of
Analysis I
DEV113
Principles of
Analysis II
DEV160
Principles of
Modeling
Behavior
2 hours
2 hours
2 hours
2 hours
2 hours
OR
Path 2
DEV275
Essentials
of Visual
Modeling
with UML
1 day
DEV475
Mastering Object
Oriented
Analysis &
Design with UML
4 days
7
The Rational University curriculum offers the courses shown here and on the next
two slides. As you can see, for each major software development team role, Rational
University offers a professional development course.
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
0-7
Mastering Object-Oriented Analysis and Design with UML 2.0
Rational University Curriculum
Rational University Curriculum
Curriculum Flow:
Enterprise Architect
Instructor-led
Web-based
Optional
Path 1
DEV110
Principles of
Modeling
2 hours
DEV111
Principles of
UC Modeling
with UML
DEV112
Principles of
Analysis I
DEV113
Principles of
Analysis II
2 hours
2 hours
2 hours
OR
Path 2
DEV475
Mastering Object
Oriented
Analysis &
Design with UML
4 days
DEV275
Essentials
of Visual
Modeling
with UML
1 day
8
0-8
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 0 - About This Course
Rational University Curriculum
Rational University Curriculum
Curriculum Flow:
System Analyst
REQ480
Management
with Use
Cases
3 days
Instructor-led
Web-based
Optional
REQ310
Essentials of
Rational
RequisitePro
DEV110
Principles of
Modeling
5 hours
2 hours
OR
OR
REQ370
Essentials of
Rational
RequisitePro
DEV275
Essentials of
Visual
Modeling with
UML
1 day
1 day
9
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
0-9
Mastering Object-Oriented Analysis and Design with UML 2.0
Course Materials
Course Materials
Student Manual, Books 1, 2, and 3
Additional Information Appendix
Exercise Workbook
Payroll Exercise Solution
10
The Student Manual contains copies of the slides, as well as detailed Student
Notes.The Student Manual is comprised of three books.
The Additional Information Appendix contains a collection of additional topics that
are not general enough to be included in the base course, or may be considered too
advanced for the introductory audience. These topics may or may not be covered by
the instructor. This appendix contains the UML-To-Language Maps that show the
map from the UML to implementation language constructs for the following
languages: C++, Java, PowerBuilder, and Visual Basic. It also contains information
on several additional Architectural Mechanisms.
The Exercise Workbook is made up of three documents or handbooks. The
requirements that drive the development of the example and exercise design models
are documented in the Exercise Workbook: Course Registration Requirements and
Payroll Requirements, respectively.
The architectural “givens” that guide the students in the development of the exercise
design model are documented in the Exercise Workbook: Payroll Architecture
Handbook.
The Payroll Exercise Solution contains the hard-copy of the course exercise
solutions.
0 - 10
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 0 - About This Course
Other Sources of Information
Other Sources of Information
Rational Unified Process
/>ducts/rup
Rational Web Site
/>
Rational developerWorks
/>
Rational Developer Domain
/>
11
•
•
The Rational Web site provides the latest information on new products, visual
modeling and development, events, customer support, documentation and
training, to name just a few.
Rational developerWorks, a customer-only site is IBM’s resource for developers.
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
0 - 11
Mastering Object-Oriented Analysis and Design with UML 2.0
Logistics
Logistics
Morning
2-Fifteen-minute breaks
Lunch
1 Hour
Afternoon
2-Fifteen-minute breaks
12
0 - 12
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
► ► ►
Module 1
Best Practices of Software Engineering
®
IBM Software Group
Mastering Object-Oriented Analysis and Design
with UML 2.0
Module 1: Best Practices of Software
Engineering
1
Topics
Practice 1: Develop Iteratively .............................................................................. 1-6
Practice 2: Manage Requirements ........................................................................ 1-7
Practice 3: Use Component Architectures............................................................. 1-8
Practice 4: Model Visually .................................................................................. 1-10
Practice 5: Continuously Verify Quality............................................................... 1-12
Practice 6: Manage Change ................................................................................ 1-14
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-1
Mastering Object-Oriented Design and Analysis
Objectives: Best Practices
Objectives: Best Practices
Identify symptoms of software development
problems.
Explain the Best Practices.
Present the Rational Unified Process (RUP)
within the context of the Best Practices.
2
In this module, you will learn about recommended software development Best
Practices and the reasons for these recommendations. Then you will see how the
Rational Unified Process (RUP) is designed to help you implement the Best Practices.
1-2
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 1 - Best Practices of Software Engineering
Symptoms of Software Development Problems
Symptoms of Software Development Problems
9User or business needs not met
9Requirements not addressed
9Modules not integrating
9Difficulties with maintenance
9Late discovery of flaws
9Poor quality of end-user experience
9Poor performance under load
9No coordinated team effort
9Build-and-release issues
3
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-3
Mastering Object-Oriented Design and Analysis
Trace Symptoms to Root Causes
Trace Symptoms to Root Causes
Symptoms
Root Causes
Needs not met
Insufficient requirements
Requirements churn
Ambiguous communications
Modules do
notfitfit
don’t
Brittle architectures
Hard to maintain
Overwhelming complexity
Late discovery
Undetected inconsistencies
Poor quality
Poor testing
Poor performance
Subjective assessment
Colliding developers
Waterfall development
Build-and-release
Uncontrolled change
Insufficient automation
Best Practices
Develop Iteratively
Manage Requirements
Use Component Architectures
Model Visually
Visually (UML)
(UML)
Model
Continuously Verify
Verify Quality
Quality
Continuously
Manage Change
4
By treating these root causes, you will eliminate the symptoms. By eliminating the
symptoms, you’ll be in a much better position to develop high-quality software in a
repeatable and predictable fashion.
Best Practices are a set of commercially proven approaches to software development,
which, when used in combination, strike at the root causes of software development
problems. They are called “Best Practices,” not because we can precisely quantify
their value, but because they have been observed to be commonly used in the
industry by successful organizations. The Best Practices have been harvested from
thousands of customers on thousands of projects and from industry experts.
1-4
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Module 1 - Best Practices of Software Engineering
Best Practices Reinforce Each Other
Best Practices Reinforce Each Other
Best Practices
Develop Iteratively
Ensures users are involved
as requirements evolve
Manage Requirements
Use Component Architectures
Validates architectural
decisions early on
Addresses complexity of
design/implementation incrementally
Model Visually (UML)
Continuously Verify Quality
Measures quality early and often
Manage Change
Evolves baselines incrementally
5
In the case of our Best Practices, the whole is much greater than the sum of the parts.
Each of the Best Practices reinforces and, in some cases, enables the others. This slide
shows just one example: how iterative development supports the other five Best
Practices. However, each of the other five practices also enhances iterative
development. For example, iterative development done without adequate
requirements management can easily fail to converge on a solution. Requirements
can change at will, which can cause users not to agree and the iterations to go on
forever.
When requirements are managed, this is less likely to happen. Changes to
requirements are visible, and the impact on the development process is assessed
before the changes are accepted. Convergence on a stable set of requirements is
ensured. Similarly, every Best Practices supports each of the other Best Practices.
Hence, although it is possible to use one Best Practice without the others, this is not
recommended, since the resulting benefits will be significantly decreased.
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
1-5
Mastering Object-Oriented Design and Analysis
Practice 1: Develop Iteratively
Develop Iteratively
Iterative development produces an
executable
3. Requirements
1. Initial
Planning
4. Analysis & Design
2. Planning
Management
Environment
(on-going)
5. Implementation
6. Test
8. Evaluation
7. Deployment
Each iteration
results in an
executable release
6
Developing iteratively is a technique that is used to deliver the functionality of a
system in a successive series of releases of increasing completeness. Each release is
developed in a specific, fixed time period called an iteration.
Each iteration is focused on defining, analyzing, designing, building, and testing a set
of requirements.
The earliest iterations address the greatest risks. Each iteration includes integration
and testing and produces an executable release. Iterations help:
•
•
•
•
•
Resolve major risks before making large investments.
Enable early user feedback.
Make testing and integration continuous.
Define a project’s short-term objective milestone.
Make deployment of partial implementations possible.
Instead of developing the whole system in lock step, an increment (for example, a
subset of system functionality) is selected and developed, then another increment,
and so on. The selection of the first increment to be developed is based on risk, with
the highest priority risks first. To address the selected risk(s), choose a subset of use
cases. Develop the minimal set of use cases that will allow objective verification (that
is, through a set of executable tests) of the risks that you have chosen. Then, select
the next increment to address the next-highest risk, and so on.
1-6
© Copyright IBM Corp. 2004
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.