Tải bản đầy đủ (.pdf) (33 trang)

UML WEEKEND CRASH COURSE phần 1 ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.14 MB, 33 trang )

WEEKEND CRASH COURSE
WEEKEND CRASH COURSE

PENDER
UML
THOMAS A.
PENDER
UML modeling tools,
self-assessment
software, and
more on CD-ROM
30 Sessions
That Will Have
You Working
with UML in
Only 15 Hours
UML
HOUR
15
15
he big day is Monday. The day you get to show off what you
know about the Unified Modeling Language. The problem is, you’re not
really up to speed. Maybe it’s been a while since you worked with UML. Or
maybe you just like a challenge. In any event, we’ve got a solution for
you — UML Weekend Crash Course. Open the book Friday evening and on
Sunday afternoon, after completing 30 fast, focused sessions, you’ll be able
to dive right in and start modeling business processes, objects, data, XML,
and more. It’s as simple as that.
Get Up to Speed on UML —
in a Weekend!
Get Up to Speed on UML —


in a Weekend!
CD-ROM INCLUDES:
• System Architect
trial version
• Describe Enterprise
trial version
• Supplemental
illustrations and
cheat sheets
• Assessment software
• Fully searchable
e-version of the book
• Complete UML
specification
System Requirements:
PC with Pentium 200 or higher,
running Windows NT or 2000,
64 MB RAM, CD-ROM drive.
See the “What’s on the CD-ROM”
appendix for details and
complete system requirements.
Category:
Programming/
Data Modeling & Design
WEEKEND CRASH COURSE
WEEKEND CRASH COURSE
T

ISBN 0-7645-4910-3
,!7IA7G4-fejbag!:p;M;t;t;T

The Curriculum
FRIDAY
Evening: 4 Sessions, 2 Hours
• What Is the UML?
• UML and Development
Methodologies
• How to Approach the
UML
• Defining Requirements
for the Case Study
SATURDAY
Morning: 6 Sessions, 3 Hours
• Understanding the Use
Case Model
• Building the Use Case
Diagram
• Building the Use Case
Narrative
• Identifying the Use Case
Scenarios
• Modeling the Static View:
The Class Diagram
• The Class Diagram:
Associations
SATURDAY, continued
Afternoon: 6 Sessions, 3 Hours
• The Class Diagram: Aggre-
gation and Generalization
• Applying the Class
Diagram to the Case Study

• Modeling the Static View:
The Object Diagram
• Modeling the Functional
View: The Activity Diagram
• Applying the Activity
Diagram to the Case Study
• Modeling the Dynamic
View: The Sequence
Diagram
Evening: 4 Sessions, 2 Hours
• Applying the Sequence
Diagram to the Case Study
• Modeling the Dynamic
View: The Collaboration
Diagram
• Applying the Collaboration
Diagram to the Case Study
• Modeling the Dynamic
View: The Statechart
Diagram
SUNDAY
Morning: 6 Sessions, 3 Hours
• Applying the Basic
Statechart to the Case
Study
• Modeling the Extended
Features of the Statechart
• Applying the Extended
Statechart Features to the
Case Study

• Modeling the Development
Environment
• Modeling the Static View:
The Component Diagram
• Modeling the Static View:
The Deployment Diagram
Afternoon: 4 Sessions, 2 Hours
• Introduction to Web
Development with Java
• Analysis and Architectural
Design of a Web
Application
• Design of a Web
Application
• UML Modeling Tools
WEEKEND
CRASH
COURSE
HOURS
*85555-BADCCb
For more information on
Wiley Publishing, Inc., go to
www.wiley.com/compbooks/
$29.99 US
$44.99 CAN
£23.99 UK incl. VAT
4910-3 Cover 5/30/02 3:33 PM Page 1
UML
Weekend Crash Course


014910-3 FM.F 5/31/02 2:03 PM Page i
014910-3 FM.F 5/31/02 2:03 PM Page ii
UML
Weekend Crash Course

Thomas A. Pender
Best-Selling Books • Digital Downloads • e-Books • Answer Networks • e-Newsletters • Branded Web Sites • e-Learning
014910-3 FM.F 5/31/02 2:03 PM Page iii
UML Weekend Crash Course ™
Published by
Wiley Publishing, Inc.
909 Third Avenue
New York, NY 10022
www.wiley.com
Copyright © 2002 by Wiley Publishing, Inc., Indianapolis, Indiana
LOC: 2002103278
ISBN: 0-7645-4910-3
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
1B/SQ//QW/QS/IN
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections
107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or
authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive,
Danvers, MA 01923, (978) 750-8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed
to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax
(317) 572-4447, E-Mail:


Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing
this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of
this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No
warranty may be created or extended by sales representatives or written sales materials. The advice and strategies con-
tained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither
the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not lim-
ited to special, incidental, consequential, or other damages.
For general information on our other products and services or to obtain technical support, please contact our Customer
Care Department within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be avail-
able in electronic books.
Trademarks: Wiley, the Wiley Publishing logo, Weekend Crash Course and related trade dress are trademarks or regis-
tered trademarks of Wiley Publishing, Inc., in the United States and other countries, and may not be used without
written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not
associated with any product or vendor mentioned in this book.
is a trademark of Wiley Publishing, Inc.
014910-3 FM.F 5/31/02 2:03 PM Page iv
About the Author
Tom Pender is the author of six courses on the UML. He has taught throughout the
United States and 12 other countries. He has over 20 years’ experience in systems develop-
ment in industries as diverse as coal mining, power plants, wholesale distribution, ware-
housing, insurance, investing, materials management, weather satellites, and retail. He has
spent the past four years teaching and consulting with companies who are transitioning to
object-oriented technologies. In addition to writing, Tom enjoys collecting silver-age comic
books, and studying science and history.
014910-3 FM.F 5/31/02 2:03 PM Page v
Credits
Acquisitions Editor
Terri Varveris
Project Editor

Sara Shlaer
Technical Editor
Lou Varveris
Copy Editor
Elizabeth Kuball
Editorial Manager
Mary Beth Wakefield
Vice President and Executive Group
Publisher
Richard Swadley
Vice President and Executive Publisher
Bob Ipsen
Vice President and Publisher
Joseph B. Wikert
Editorial Director
Mary Bednarek
Project Coordinator
Nancee Reeves
Graphics and Production Specialists
Beth Brooks
Sean Decker
Melanie DesJardins
Kristin McMullan
Heather Pope
Quality Control Technicians
Dave Faust
John Greenough
Andy Hollandbeck
Carl Pierce
Dwight Ramsey

Permissions Editor
Carmen Krikorian
Media Development Specialist
Travis Silvers
Proofreading and Indexing
TECHBOOKS Production Services
014910-3 FM.F 5/31/02 2:03 PM Page vi
With thanks to Lynne Angeloro
for her support and friendship
014910-3 FM.F 5/31/02 2:03 PM Page vii
014910-3 FM.F 5/31/02 2:03 PM Page viii
W
elcome to the UML Weekend Crash Course. So why another UML book? The Weekend
Crash Course series is designed to give you quick access to the topics you want to
learn. You won’t find a ton of reference material in this book. You won’t find a
book that assumes you have a specific programming background. Instead, you will find the
material you need to get the job done, no matter what your background.
You are about to experience the joy of discovering and modeling a complete software
system design from start to finish. You will be equipped with tools to work with client and
technical professionals alike and to overcome so much of the confusion and frustration
common to software projects. You will master one of the most practical and useful tools in
current technology, the Unified Modeling Language.
Who Should Read This Book
This crash course is designed to provide you with a set of short lessons that you can grasp
quickly — in one weekend. The book is intended for three audience categories:
¼
Programmers who want or need to learn more about design and specifically how the
tools of the UML help in design. Perhaps you have seen the modeling tools used on
projects and want to know how to use them yourself. This course provides 30
focused sessions on the most practical aspects of the UML modeling tools. You will

learn the role of each diagram, the notations to draw them, and how to apply them
using a realistic case study.
¼
Team leaders and analysts who need a tool to help communicate what the project is
all about. You haven’t written code in a while, but you know what you want the sys-
tem to do for your clients. You need a way to express the requirements in a way that
all the participants can understand and support throughout the project life cycle. The
course sessions break down the diagrams to clearly explain why and how you would
use them. I also provide tips on how to make sure that what you’re doing is correct.
¼
Business analysts and clients who need to communicate with systems developers.
One of the challenges in projects is finding a common language, a way to communi-
cate effectively and consistently. The UML provides a common ground for business
and technical professionals. The examples in the course are nontechnical yet very
practical for establishing a common language to describe critical business systems.
Preface
014910-3 FM.F 5/31/02 2:03 PM Page ix
To get the most out of this book, you should be familiar with software projects and the
various participants. I don’t cover project management or much of the technology used in
projects. In fact, I assume you know the project-related concepts like code, databases, pro-
grams, requirements, business processes, clients, developers, and analysts.
What You Need To Have
The requirements for the course are very basic. You can create all the diagrams with pencil
and paper. If you like, you can download any one of the modeling tools mentioned in the
book. Nearly all vendors provide an evaluation copy for 15 to 30 days, more than enough
time to complete the course and try out the tool. For a list of vendor sites see Session 30.
I’ll offer two cautions regarding the use of tools: First, there are a few free tools out there,
but most of them are not complete and might get in the way of your work. Second, if you
are struggling with the tool, go back to paper until you finish the course. Focus on learning
the concepts, then work on using a tool. The concepts are more important than the

mechanics of a particular tool.
What Results Can You Expect?
How realistic is it to try to learn the UML in one weekend? The UML is like many things you
learn. Grasping the basics is easy, but it can take years to master the application. The UML
defines ten diagrams. Five of those get used a lot; the other five are more specialized and
are used less frequently. All of the concepts represented in the diagrams should already be
familiar, concepts such as clients, business processes, and messages. The toughest part is
learning the terminology. That is why the course focuses on giving you definitions and lots
of examples.
There is more to the UML than I could possibly cover in 15 hours. But I can give you a
solid understanding of the core concepts that will support 80 percent of your work. You will
know the purpose of each diagram, how the diagrams work together, the entire notation to
construct each diagram, and even ways to test your work. After you work through the
examples and the case study, you should be able to immediately start applying your new
understanding at work with confidence.
Weekend Crash Course Layout and Features
This book follows the Weekend Crash Course layout and includes the standard features of
the series so that you can be assured of mastering the UML within a solid weekend. You
should take breaks throughout. I’ve arranged things so that the 30 sessions last approxi-
mately 30 minutes each. The sessions are grouped within parts that take two or three hours
to complete. At the end of each session, you’ll find “Quiz Yourself” questions, and at the
end of each part, you’ll find part review questions. These questions let you test your knowl-
edge and practice your newfound skills. (The answers to the part review questions are in
Appendix A.) Between sessions, take a break, grab a snack, and refill that beverage glass,
before plunging into the next session!
This Weekend Crash Course contains 30 half-hour sessions organized within six parts. The
parts correspond to a time during the weekend, as outlined in the following sections.
Prefacex
014910-3 FM.F 5/31/02 2:03 PM Page x
Part I: Friday Evening

In this part, I provide the background of the UML and how you can approach it to get the
most out of it. I cover a brief history of the UML and what exactly the UML defines. Next,
I briefly cover some sample methodologies to explain the context in which you will use the
UML. I also cover an overview of the diagrams supported by the UML and the fundamental
object-oriented concepts used throughout the development of those diagrams.
When the background is complete, you will dive into the Case Study to gather requirements.
Part II: Saturday Morning
This part covers the application of the Use Case Model, from the diagram through narratives
and scenarios to fully document user requirements. You will learn to identify and define Use
Cases in terms that can be verified by your clients. You will explain the requirements of
each Use Case so that they form the foundation for testing throughout the project. Then,
based on the requirements, you will begin the construction of the Class diagram, including
classes and associations.
Part III: Saturday Afternoon
In the afternoon session, you will learn the rest of the Class diagram notation and apply it
to the case study. You will refine the Class diagram by applying aggregation, composition,
and inheritance. You will then test the Class diagram using the Object diagram, applying
test cases to validate your Class diagram notation. You will also learn to use the Activity
diagram to model logic, such as business processes and complex system behaviors. Then you
start modeling the interactions between objects using the Sequence diagram by bringing
together the test cases and the resources defined in your Class diagram.
Part IV: Saturday Evening
You will continue your application of the Sequence diagram. Then you will learn another,
complementary tool, the Collaboration diagram, to model object interactions. You will learn
the unique properties of these diagrams and how they can work together to reveal holes in
your design. For those objects that are constantly changing, you will learn the Statechart
diagram so that you can fully understand and document their behavior over time.
Part V: Sunday Morning
The application of the Statechart will continue into Sunday Morning with lots of practical
examples. By this time you will have seen a lot of diagrams. You will learn how to organize

your work using Package diagrams. Then, when the design is reaching the point where you
need to build the system, you will learn how to model the physical implementation using
the Component and Deployment diagrams.
Part VI: Sunday Afternoon
Sunday Afternoon you will learn how the UML diagrams are applied to the development of a
Web application. Finally, I will provide some information about modeling tools, including
evaluation criteria and sources to obtain evaluation copies.
Preface xi
014910-3 FM.F 5/31/02 2:03 PM Page xi
Features
First, as you go through each session, look for the following time status icons that let you
know how much progress you’ve made throughout the session:
The book also contains other icons that highlight special points of interest:
This flag is to clue you in to an important piece of information that you
should file away in your head for later.
This gives you helpful advice on the best ways to do things, or a tricky
technique that can make your UML modeling go smoother.
Never fail to check these items out because they provide warnings that you
should consider.
This states where in the other sessions related material can be found.
Accompanying CD-ROM
This Weekend Crash Course includes a CD-ROM. It contains trial software, a skills assessment
test, a copy of the UML standard, and some supplemental materials I think you will find it
useful. For a more complete description of each item on the CD-ROM, see Appendix B.
Reach Out
The publisher and I want your feedback. Please let us know of any mistakes in the book of if
a topic is covered particularly well. You can send your comments to the publisher at Wiley
Publishing, Inc., 909 Third Avenue, New York, NY, 10022 or e-mail them to
www.wiley.com
.

You also can e-mail me directly at

.
You are ready to begin your Weekend Crash Course. Stake out a weekend, stockpile some
snacks, cool the beverage of your choice, set your seat in the upright position, fasten your
seat belt, and get ready to learn the UML the easy way. Turn the page and start learning.
Cross-Ref
Never
Tip
Note
Prefacexii
014910-3 FM.F 5/31/02 2:03 PM Page xii
Preface ix
FRIDAY 2
Part I—Friday Evening 4
Session 1–What Is the UML? 5
Session 2–UML and Development Methodologies 13
Session 3–How to Approach the UML 23
Session 4–Defining Requirements for the Case Study 35
SATURDAY 46
Part II—Saturday Morning 48
Session 5–Understanding the Use Case Model 49
Session 6–Building the Use Case Diagram 61
Session 7–Building the Use Case Narrative 69
Session 8–Identifying the Use Case Scenarios 81
Session 9–Modeling the Static View: The Class Diagram 93
Session 10–The Class Diagram: Associations 105
Part III—Saturday Afternoon 116
Session 11–The Class Diagram: Aggregation and Generalization 117
Session 12–Applying the Class Diagram to the Case Study 129

Session 13–Modeling the Static View: The Object Diagram 139
Session 14–Modeling the Functional View: The Activity Diagram 149
Session 15–Applying the Activity Diagram to the Case Study 157
Session 16–Modeling the Dynamic View: The Sequence Diagram 167
Part IV—Saturday Evening 178
Session 17–Applying the Sequence Diagram to the Case Study 179
Session 18–Modeling the Dynamic View: The Collaboration Diagram 187
Session 19–Applying the Collaboration Diagram to the Case Study 193
Session 20–Modeling the Dynamic View: The Statechart Diagram 203
SUNDAY 214
Part V—Sunday Morning 216
Session 21–Applying the Basic Statechart to the Case Study 217
Session 22–Modeling the Extended Features of the Statechart 227
Session 23–Applying the Extended Statechart Features to the Case Study 237
Session 24–Modeling the Development Environment 245
Session 25–Modeling the Static View: The Component Diagram 255
Session 26–Modeling the Static View: The Deployment Diagram 263
Contents at a Glance
014910-3 FM.F 5/31/02 2:03 PM Page xiii
Part VI—Sunday Afternoon 276
Session 27–Introduction to Web Development with Java 277
Session 28–Analysis and Architectural Design of a Web Application 287
Session 29–Design of a Web Application 297
Session 30–UML Modeling Tools 307
Appendix A–Answers to Part Reviews 317
Appendix B–What’s on the CD-ROM? 329
Glossary 333
Index 345
End-User License Agreement 359
014910-3 FM.F 5/31/02 2:03 PM Page xiv

Preface ix
FRIDAY 2
Part I—Friday Evening 4
Session 1–What Is the UML? 5
Establishing Standards 5
Some History behind the UML
6
What is and is not included in the UML Specification
6
The UML metamodel
6
The organization of the metamodel
7
UML Extension Mechanisms
8
Ten Diagrams
9
The Continuing Refinement and Expansion of the UML
10
Session 2–UML and Development Methodologies 13
Some Current Methodologies 13
The Rational Unified Process
14
Strengths of the RUP
15
Weaknesses of the RUP
16
Shlaer-Mellor Method
16
Strengths of Shlaer-Mellor

17
Weaknesses of Shlaer-Mellor
17
CRC
18
Strengths of CRC
19
Weaknesses of CRC
19
Extreme Programming
20
Strengths of XP
20
Weaknesses of XP
20
Resources
21
Session 3–How to Approach the UML 23
Views 23
Functional View
24
Static View
25
Dynamic View
26
Three views
27
Object-Oriented Principles
28
Abstraction

28
What an object knows
29
Information
29
Behavior
30
Contents
014910-3 FM.F 5/31/02 2:03 PM Page xv
Encapsulation 30
To use the object
30
To make the object work properly
31
Giving an object purpose
32
Encapsulation summary
32
Session 4–Defining Requirements for the Case Study 35
The Case Study Problem Statement 35
Receiving
36
Stocking
36
Order fulfillment
36
Shipping
36
Types of Requirements
36

Business process
37
Constraints
38
Rules
38
Performance
39
An Inventory Control System
40
Identifying requirements
40
Users
40
Resources
41
Functionality
42
Avoiding early pitfalls
42
Pitfall #1: Making assumptions
43
Pitfall #2: Replicating existing implementations
43
Pitfall #3: Mistaking preferences for requirements
43
SATURDAY 46
Part II—Saturday Morning 48
Session 5–Understanding the Use Case Model 49
The Purpose of the Use Case Model 50

The Resources of the Use Case Model
51
Use Case diagram
51
Use Case narrative
51
Use Case scenarios
52
Defining the Elements of the Use Case Diagram
52
Use Case system
53
Use Case actors
53
Use Cases
54
Use Case relationships
55
Association notation
56
Stereotype notation
56
<<include>> dependency notation
56
<<extend>> dependency notation
57
Generalization
58
Contentsxvi
014910-3 FM.F 5/31/02 2:03 PM Page xvi

Session 6–Building the Use Case Diagram 61
Building the Use Case Diagram for the Case Study 61
Step 1: Set the context of the target system
62
Step 2: Identify the actors
62
Step 3: Identify the Use Cases
63
Step 4: Define the associations between actors and Use Cases
64
Step 5: Evaluate the actors and Use Cases to find opportunities for refinement
65
Step 6: Evaluate the Use Cases for <<include>> dependencies
66
Step 7: Evaluate the Use Cases for <<extend>> dependencies
66
Step 8: Evaluate the actors and Use Cases for generalization
67
Session 7–Building the Use Case Narrative 69
Elements of a Use Case Narrative 69
Assumptions
70
Pre-conditions
70
Use Case initiation
71
Dialog
71
Use Case termination
72

Post-conditions
72
Additional narrative elements
73
Writing a Use Case Narrative for the Case Study
74
Assumptions in the case study narrative
75
Pre-conditions in the case study narrative
75
Use Case initiation in the case study narrative
75
Use Case dialog in the case study narrative
76
Use Case termination in the case study narrative
77
Post-conditions in the case study narrative
77
Session 8–Identifying the Use Case Scenarios 81
Describing Use Case Scenarios 81
Why you should care about Use Case scenarios
82
How to find Use Case scenarios
83
Finding Use Case scenarios for the case study
84
Applying Use Case scenarios
90
Session 9–Modeling the Static View: The Class Diagram 93
The Object Model 93

The Class diagram
94
The Object diagram
95
Elements of the Class Definition
95
Modeling an Attribute
95
Attribute visibility
96
Creating an attribute specification
97
Modeling an Operation
98
Elements of an operation specification
98
Creating an operation specification
99
Contents xvii
014910-3 FM.F 5/31/02 2:03 PM Page xvii
Modeling the Class Compartments 100
Name compartment
101
Attribute compartment
101
Operation compartment
102
Creating Different Views of a Class
102
Session 10–The Class Diagram: Associations 105

Modeling Basic Association Notations 106
Association name
106
Association multiplicity
107
Association roles
109
Association constraints
109
Modeling Extended Association Notations
110
Association class
110
Reflexive association
111
Qualified association
111
Part III—Saturday Afternoon 116
Session 11–The Class Diagram: Aggregation and Generalization 117
Modeling Aggregation and Composition 117
Elements of aggregation
118
Elements of composition
119
Creating aggregation and composition relationships
120
Modeling Generalization
121
Elements of generalization
122

An illustration: How to model generalization
124
Session 12–Applying the Class Diagram to the Case Study 129
Modeling the Inventory Control System for the Case Study 129
Problem statement: for the inventory control system
129
Building the Class diagram
130
Understanding UML Notation for Design Patterns
133
Using Design Patterns in the Class Diagram
135
Session 13–Modeling the Static View: The Object Diagram 139
Understanding the Object Diagram 139
Introducing Elements of the Object Diagram Notation
140
Comparing the Object Diagram and the Class Diagram Notations
140
Applying Object Diagrams to Test Class Diagrams
142
Test case 1
143
Test case 2
143
Test case 3
145
Test case 4
145
Session 14–Modeling the Functional View: The Activity Diagram 149
Introducing the Activity Diagram 149

Modeling workflow and Use Cases
149
Defining methods
150
Contentsxviii
014910-3 FM.F 5/31/02 2:03 PM Page xviii
Taking a Look at Activity Diagram Notation 151
Activities and transitions
151
Guard condition
151
Decisions
152
Merge point
153
Start and end
154
Concurrency
154
Session 15–Applying the Activity Diagram to the Case Study 157
Building an Activity Diagram for the Case Study 157
Session 16–Modeling the Dynamic View: The Sequence Diagram 167
Understanding the Dynamic View 167
Knowing the purpose of Sequence and Collaboration diagrams
168
Mapping interactions to objects
168
Defining the basic notation of the Sequence diagram
169
Defining the extended notation for the Sequence diagram

171
Part IV—Saturday Evening 178
Session 17–Applying the Sequence Diagram to the Case Study 179
Building a Sequence Diagram from a Scenario 179
Session 18–Modeling the Dynamic View: The Collaboration Diagram 187
The Collaboration Diagram 187
Diagram similarities
188
Diagram differences
188
Collaboration Diagram Notation
189
Session 19–Applying the Collaboration Diagram to the Case Study 193
Building a Collaboration Diagram from a Scenario 193
Mapping the Sequence and Collaboration Diagram
Elements to the Class Diagram
200
Session 20–Modeling the Dynamic View: The Statechart Diagram 203
Describing the Purpose and Function of the Statechart Diagram 203
Defining the Fundamental Notation for a Statechart Diagram
204
Building a Statechart Diagram
206
Defining Internal Events and Activities
210
SUNDAY 214
Part V—Sunday Morning 216
Session 21–Applying the Basic Statechart to the Case Study 217
Defining Entry and Exit Actions 217
Defining Send Events

219
Order of Events
220
Applying the Basic Statechart
Diagram Notation to the Case Study
221
Inventory control: Problem statement
221
Constructing the Statechart diagram for the product object
221
Contents xix
014910-3 FM.F 5/31/02 2:03 PM Page xix
Session 22–Modeling the Extended Features of the Statechart 227
Modeling Transition Events 227
Call event
228
Time event
229
Change event
229
Making events conditional
230
Send event
231
Guard conditions as events
231
Modeling Superstates and Substates
231
Split of control
232

Concurrency
233
Session 23–Applying the Extended Statechart Features to the Case Study 237
Deriving a Statechart from Sequence Diagrams 237
Session 24–Modeling the Development Environment 245
Describing the Purpose and Function of Packages 245
Packages Provide a Namespace
246
Defining the Notation for Packages and Package Diagrams
247
Package stereotypes
247
Package dependency
247
Dependency stereotypes
248
Model elements in a package
249
Constructing a Package Diagram for the Case Study
250
Sesssion 25–Modeling the Static View: The Component Diagram 255
Explaining the Component Diagram 255
Defining the Notation for Components and Component Dependencies
256
Component stereotypes
256
Component interfaces
257
Component dependencies
257

Building a Component Diagram for the Case Study
258
Mapping the Logical Design to the Physical Implementation
260
Session 26–Modeling the Static View: The Deployment Diagram 263
Describing the Purpose and Function of the Deployment Diagram 263
Defining the Notation for the Deployment Diagram
264
Mapping Software Components to an Architecture
266
Applying the Combined Diagrams to the Case Study
266
Part VI—Sunday Afternoon 276
Session 27–Introduction to Web Development with Java 277
The Value of UML in Web Development 277
Issues in Using the UML in Web Development
278
Basic Web Architecture and Static Web Content
278
Dynamic Web Content
280
Java servlets
281
Template pages
283
JavaServer Pages
283
Contentsxx
014910-3 FM.F 5/31/02 2:03 PM Page xx
Session 28–Analysis and Architectural Design of a Web Application 287

The Friendly Reminder Case Study 287
Requirements Gathering
288
Creating the Use Case diagram
289
Analysis
290
Architectural Design
291
Model View Controller
291
JavaBeans
292
MVC pattern in the case study
294
Session 29–Design of a Web Application 297
Model 2 Architecture 297
Uploading Appointments and Contacts
299
Detailed Design
300
Querying appointments and contacts
300
Web technologies on an implementation Class diagram
302
XML
302
UML modeling of XML
303
Appointment XML in the case study

303
Web Application Extension
305
Session 30–UML Modeling Tools 307
Explaining the Purpose and Function of Modeling Tools 307
Explaining Evaluation Criteria for Modeling Tools
308
The basics
309
Type and version of the UML supported
309
Platform support
309
Printing
309
HTML documentation
309
Repository
310
Code generation
310
Integrated editor
310
Version control
310
Extended features
311
Round-trip engineering
311
Data modeling integration

311
Customization
312
XML Metadata Interchange
312
Team development
313
Evaluating UML Modeling Tools
313
Appendix A–Answers to Part Reviews 317
Appendix B–What’s on the CD-ROM? 329
Glossary 333
Index 345
End-User License Agreement 359
Contents xxi
014910-3 FM.F 5/31/02 2:03 PM Page xxi
014910-3 FM.F 5/31/02 2:03 PM Page xxii
UML
Weekend Crash Course

014910-3 FM.F 5/31/02 2:03 PM Page 1
024910-3 DPOO1.F 5/31/02 2:03 PM Page 2

×