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: permcoordinator@wiley.com. 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 [...]... 359 xxi 014 910 -3 FM.F 5/ 31/ 02 2:03 PM Page xxii 014 910 -3 FM.F 5/ 31/ 02 2:03 PM Page 1 UML Weekend Crash Course 024 910 -3 DPOO1.F 5/ 31/ 02 2:03 PM Page 2 024 910 -3 DPOO1.F 5/ 31/ 02 2:03 PM Page 3 Part I — Friday Evening Session 1 What Is the UML? Session 2 UML and Development Methodologies Session 3 How to Approach the UML Session 4 Defining Requirements for the Case Study 034 910 -3 Pt 01. F 5/ 31/ 02 2:03... multiplicity .10 7 Association roles 10 9 Association constraints 10 9 Modeling Extended Association Notations .11 0 Association class 11 0 Reflexive association 11 1 Qualified association 11 1 Part III—Saturday Afternoon 11 6 Session 11 –The Class Diagram: Aggregation and Generalization 11 7 Modeling Aggregation and Composition 11 7 Elements of... 14 2 Test case 1 14 3 Test case 2 14 3 Test case 3 14 5 Test case 4 14 5 Session 14 –Modeling the Functional View: The Activity Diagram 14 9 Introducing the Activity Diagram 14 9 Modeling workflow and Use Cases 14 9 Defining methods .15 0 014 910 -3 FM.F 5/ 31/ 02 2:03 PM Page xix Contents Taking a Look at Activity Diagram Notation 15 1 Activities... Case Scenarios 81 Session 9–Modeling the Static View: The Class Diagram 93 Session 10 –The Class Diagram: Associations 10 5 Part III—Saturday Afternoon 11 6 Session 11 –The Class Diagram: Aggregation and Generalization .11 7 Session 12 –Applying the Class Diagram to the Case Study .12 9 Session 13 –Modeling the Static View: The Object Diagram .13 9 Session 14 –Modeling the Functional... 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... transitions 15 1 Guard condition .15 1 Decisions 15 2 Merge point 15 3 Start and end 15 4 Concurrency 15 4 Session 15 –Applying the Activity Diagram to the Case Study .15 7 Building an Activity Diagram for the Case Study 15 7 Session 16 –Modeling the Dynamic View: The Sequence Diagram 16 7 Understanding the Dynamic View 16 7 Knowing the purpose... 99 xvii 014 910 -3 FM.F 5/ 31/ 02 xviii 2:03 PM Page xviii Contents Modeling the Class Compartments 10 0 Name compartment 10 1 Attribute compartment 10 1 Operation compartment 10 2 Creating Different Views of a Class 10 2 Session 10 –The Class Diagram: Associations .10 5 Modeling Basic Association Notations .10 6 Association name .10 6 Association... 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 ... Activity Diagram .14 9 Session 15 –Applying the Activity Diagram to the Case Study 15 7 Session 16 –Modeling the Dynamic View: The Sequence Diagram 16 7 Part IV—Saturday Evening 17 8 Session 17 –Applying the Sequence Diagram to the Case Study 17 9 Session 18 –Modeling the Dynamic View: The Collaboration Diagram 18 7 Session 19 –Applying the Collaboration Diagram to the Case Study 19 3 Session 20–Modeling... of aggregation .11 8 Elements of composition .11 9 Creating aggregation and composition relationships 12 0 Modeling Generalization 12 1 Elements of generalization 12 2 An illustration: How to model generalization 12 4 Session 12 –Applying the Class Diagram to the Case Study 12 9 Modeling the Inventory Control System for the Case Study 12 9 Problem statement: for . VAT 4 910 -3 Cover 5/30/02 3:33 PM Page 1 UML Weekend Crash Course ™ 014 910 -3 FM.F 5/ 31/ 02 2:03 PM Page i 014 910 -3 FM.F 5/ 31/ 02 2:03 PM Page ii UML Weekend Crash Course ™ Thomas A. Pender Best-Selling. constraints 10 9 Modeling Extended Association Notations 11 0 Association class 11 0 Reflexive association 11 1 Qualified association 11 1 Part III—Saturday Afternoon 11 6 Session 11 –The Class. 11 7 Modeling Aggregation and Composition 11 7 Elements of aggregation 11 8 Elements of composition 11 9 Creating aggregation and composition relationships 12 0 Modeling Generalization 12 1 Elements