Vous êtes sur la page 1sur 10

UML™:

A Beginner’s Guide

Jason T. Roff

2
Copyright © 2003 by The McGraw-Hill Companies. All rights reserved. Except as
permitted under the United States Copyright Act of 1976, no part of this publication
may be reproduced or distributed in any form or by any means, or stored in a database
or retrieval system, without the prior written permission of the publisher.
ISBN: 978-0-07-178221-0
MHID: 0-07-178221-4
The material in this eBook also appears in the print version of this title: ISBN: 978-0-
07-222460-3, MHID: 0-07-222460-6.
All trademarks are trademarks of their respective owners. Rather than put a trademark
symbol after every occurrence of a trademarked name, we use names in an editorial
fashion only, and to the benefit of the trademark owner, with no intention of
infringement of the trademark. Where such designations appear in this book, they have
been printed with initial caps.
McGraw-Hill eBooks are available at special quantity discounts to use as premiums
and sales promotions, or for use in corporate training programs. To contact a
representative please e-mail us at bulksales@mcgraw-hill.com.
Information has been obtained by McGraw-Hill/Osborne from sources believed to be
reliable. However, because of the possibility of human or mechanical error by our
sources, McGraw-Hill/Osborne, or others, McGraw-Hill/Osborne does not guarantee
the accuracy, adequacy, or completeness of any information and is not responsible for
any errors or omissions or the results obtained from the use of such information.
TERMS OF USE
This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”)
and its licensors reserve all rights in and to the work. Use of this work is subject to
these terms. Except as permitted under the Copyright Act of 1976 and the right to store
and retrieve one copy of the work, you may not decompile, disassemble, reverse
engineer, reproduce, modify, create derivative works based upon, transmit, distribute,
disseminate, sell, publish or sublicense the work or any part of it without McGraw-
Hill’s prior consent. You may use the work for your own noncommercial and personal
use; any other use of the work is strictly prohibited. Your right to use the work may be
terminated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS
MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY,
ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM
USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE
ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND
EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-
Hill and its licensors do not warrant or guarantee that the functions contained in the

3
work will meet your requirements or that its operation will be uninterrupted or error
free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for
any inaccuracy, error or omission, regardless of cause, in the work or for any damages
resulting there from. McGraw-Hill has no responsibility for the content of any
information accessed through the work. Under no circumstances shall McGraw-Hill
and/or its licensors be liable for any indirect, incidental, special, punitive,
consequential or similar damages that result from the use of or inability to use the
work, even if any of them has been advised of the possibility of such damages. This
limitation of liability shall apply to any claim or cause whatsoever whether such claim
or cause arises in contract, tort or otherwise.

4
For Zachary, I love you.
For Kimberly, I love you.

5
About the Author
Jason T. Roff owns and operates First Factory, Inc., a software development consulting
firm specializing in Microsoft software and Internet development, documentation
services, and web hosting (www.firstfactoryinc.com).
Jason has written a handful of books on database development and e-commerce
careers and currently specializes in .NET development with SQL Server and offsite
project management. Jason received his B.S. from Albany University in Computer
Science with Applied Mathematics and is currently seeking his M.S. degree.
Jason lives happily in Long Island, NY with his wife Kimberly and son Zachary.
Jason can be reached at jason@firstfactoryinc.com. Feel free to drop by.

6
Contents at a Glance
1 UML Fundamentals
2 Use Case Diagrams
3 Introduction to Object-Oriented Design
4 Workflow Modeling with Activity Diagrams
5 Modeling Behavior with Sequence Diagrams
6 Defining Domain Models Using Class Diagrams
7 Collaboration Diagrams
8 Further Explanation of Class Diagrams
9 Further Explanation of Sequence Diagramming

10 Modeling Behavior with Statechart Diagrams

11 Architecting with Implementation Diagrams

12 Using the Object Constraint Language


A Answers to Mastery Checks

Glossary

Index

7
Contents
ACKNOWLEDGMENTS
INTRODUCTION
1 UML Fundamentals
Critical Skill 1.1 Learn Why We Model Software
Analysis, Design, and Implementation
Software Lifecycle Models
Critical Skill 1.2 Understand the Unified Modeling Process
Inception Phase
Elaboration Phase
Construction Phase
Transition Phase
Critical Skill 1.3 Gain an Understanding of What UML Is
The History
OMG
Critical Skill 1.4 Identify the Pieces of UML
Structural Diagrams
Behavioral Diagrams
Critical Skill 1.5 Discover Available UML Modeling Tools
Rational Rose
Visio
Whiteboard or Pen and Paper
Module 1 Mastery Check
2 Use Case Diagrams
Critical Skill 2.1 Define Use Case Diagrams
Critical Skill 2.2 Discover Why We Model Use Case Diagrams
Critical Skill 2.3 Identify the Notational Components of a Use Case Diagram
System
Actors
Use Cases

8
Relationships
Subsystems
Critical Skill 2.4 Understand the Generalization Technique
Use Case to Use Case Relationship
Actor to Actor Relationships
Project 2-1 Interpret the Use Case Diagram
Critical Skill 2.5 Understand How to Use Include and Extend Relationships
Include Relationship
Extend Relationship
Critical Skill 2.6 Learn How to Describe Use Cases
Critical Skill 2.7 Learn How to Model a Use Case Diagram
Find Actors and Use Cases
Prioritize Use Cases
Detail Each Use Case
Structure the Use Case Model
Project 2-2 Model a Use Case Diagram
Module 2 Mastery Check
3 Introduction to Object-Oriented Design
Critical Skill 3.1 Identify the Characteristics of Object-Oriented Design
Critical Skill 3.2 Understand the Use of Classes in OOD
Abstraction
Encapsulation
Interfaces
Critical Skill 3.3 Understand the Use of Inheritance in OOD
Inheritance Hierarchies
Multiple Inheritance
Critical Skill 3.4 Understand the Use of Polymorphism in OOD
Project 3-1 Creating a Class Diagram
Module 3 Mastery Check
4 Workflow Modeling with Activity Diagrams
Critical Skill 4.1 Define Activity Diagrams
Critical Skill 4.2 Discover Why We Model Activity Diagrams

9
Critical Skill 4.3 Identify the Notational Components of Activity Diagrams
Activities: Action States
States
Transitions
Putting it Together
Critical Skill 4.4 Learn How to Use Conditions
Guards
Decision Points
Project 4-1 Reading an Activity Diagram
Critical Skill 4.5 Understand Other Notations Available in Activity Diagrams
Events and Triggers
Swimming
Forks and Joins
Critical Skill 4.6 Learn How to Model an Activity Diagram
Identifying Use Cases
Modeling Primary Paths
Modeling Alternative Paths
Adding Swim Lanes
Refining High-Level Activities
Project 4-2 Model an Activity Diagram
Module 4 Mastery Check
5 Modeling Behavior with Sequence Diagrams
Critical Skill 5.1 Define Sequence Diagrams
Critical Skill 5.2 Discover Why We Model Sequence Diagrams
Critical Skill 5.3 Identify the Notational Components of Sequence Diagram
Active Objects
Messages
Critical Skill 5.4 Understand How to Use Messages for Communication
Synchronous Messages
Asynchronous Messages
Flat Messages
Critical Skill 5.5 Learn Other Techniques Used in Sequence Diagrams

10

Vous aimerez peut-être aussi