A Brief Introduction to UML or UML in

A Brief Introduction to UML or UML in an Hour (more or less) Copyright 2000 by RWD Technologies Inc. All Rights Reserved

What is the UML? 4 Unified Modeling Language 4 It is a modeling language, not a process 4 Rumbaugh joined Booch at Rational in 1994; in 1995, Rational added Jacobsen to their team. In 1996, work on the UML was begun. 4 In January of 1997, Rational released UML 1. 0 to the OMG as their proposal for a methods standard. 6/16/2021 2

Objectives 4 Upon successful completion of this presentation, you will be able to: – Visually identify UML diagrams. – Understand the differences between the UML diagrams. – Identify key symbols found in each diagram. – Identify the diagrams used in each Pro. Vision phase. 6/16/2021 3

UML Diagrams to be Covered 4 4 4 4 4 Class Diagrams Use Case Diagrams Collaboration Diagrams Sequence Diagrams Package Diagrams Component Diagrams Deployment Diagrams Activity Diagrams State Diagrams 6/16/2021 4

Class Diagrams 4 Are the most fundamental UML Diagram. 4 Describe the classes in the system, and the static relationships between classes. 4 Class diagrams are used during Analysis, Design and Development. 6/16/2021 5

UML Class Diagram Customer 1 Rental Invoice Rental Item {abstract} 1. . * 1 0. . 1 1 DVD Movie 6/16/2021 VHS Movie Video Game Checkout Screen 6

UML Class Diagram Customer Class Multiplicity Simple 1 Aggregation Rental Invoice Abstract Class Rental Item {abstract} 1. . * 1 0. . 1 Composition DVD Movie 6/16/2021 Simple (Dependency) Generalization VHS Movie Video Game Association Checkout Screen 7

IDEF 1 X 97 Class Diagram Class Customer Relationship Rental Invoice Dependent class Rental Item Generalization (cluster) Multiplicity/ Base class Cardinality is abstract DVD Movie 6/16/2021 Checkout Screen VHS Movie Video Game 8

Parts of a Class 4 Classes can have four parts – Name – Attributes – Operations – Responsibilities 4 Classes can show visibility and types. 4 All parts but the Name are optional. 6/16/2021 My. Class. Name +Some. Public. Attribute : Some. Type -Some. Private. Attribute : Some. Type #Some. Protected. Attribute : Some. Type +Class. Method. One() +Class. Method. Two() Responsibilities -- can optionally be described here. 9

Object Diagrams 4 An Object is an instance of a class. 4 Object names are underlined. 4 Object diagrams are similar to class diagrams. Many of the same notations are used. 4 Object diagrams capture instances of classes, and allow the dynamic relationships to be shown. 6/16/2021 This. One : My. Class. Name +Some. Public. Attribute : Some. Type -Some. Private. Attribute : Some. Type #Some. Protected. Attribute : Some. Type +Class. Method. One() +Class. Method. Two() 10

Class and Object Diagrams Association Name Class Name Customer +id: integer +name: string Rental Item Rents 0. . 1 0. . n +id: integer +released: date Class Diagram Attributes Object Name Joe: Customer Casablanca: Movie +id: 1667 +name: Joe Smith +id: 22340 +released: 1942 Object Diagram 6/16/2021 11

Stereotypes, Tagged Values and Constraints 4 Stereotypes, Tagged Values and Constraints extend the UML – Stereotypes are shown using <<>> – Tagged Values and Constraints are shown using { } Tagged Value Stereotype Rental. Contract <<persistent>> {version=1. 1} List. Of. Rented. Items Customer {ordered by title} Constraint 6/16/2021 12

Use Cases 4 Describe interactions between users and computer systems (both called actors). 4 Capture user-visible functions. 4 Achieve discrete measurable goals. 4 May be – small (“Make selected text bold”) – large (“Generate a table of contents”) 4 Are typically used during Analysis and Design. 6/16/2021 13

Use Case Diagram Use Case Actor Identify Movie Customer Open Account Clerk Return Movie In-Store Customer 6/16/2021 Telephone Customer Review Account Status 14

Use Case Report 4 The Use Case Report provides documentation for the Use Case. 4 A Use Case is not complete without the report. 4 The elements of the Use Case Report are shown on the right. 6/16/2021 4 Brief description 4 Precondition 4 Flow of events – Main flow – Subflows – Alternate flows 4 Postcondition 4 Special Requirements 4 Enclosures – Diagrams – Pictures of the UI 15

Extends and Includes Relationships Dependency «includes» Find Item by Title Includes «includes» Customer Search Movie Database Find Items by Actor Stereotype Extends «extends» Clerk 6/16/2021 Check In Movie Assess Late Fees 16

Collaboration Diagrams 4 Collaboration diagrams describe object interactions organized around the objects and their links to each other 4 Focus on exchange of messages between objects through their associations. 4 Appears during Analysis phase 4 Enhanced during Design phase 6/16/2021 17

Collaboration Diagram - Rent Movie : Rented Items 1: enter_customer() 3: enter_movies() Object 5: add(customer, movies) 8: generate. Rental. Total() 2: Is. Valid. Cust(Cust. Id) 7: print invoice() : Check-out Manager : Customer : Clerk 4: Get. Movie. By. Barcode() : Inventory 6/16/2021 Message 18

Sequence Diagrams 4 Can be “morphed” from Collaboration Diagrams. 4 Describe interactions between objects arranged in time sequence 4 Focus on objects and classes involved in the scenario and the sequence of messages exchanged 4 Associated with use cases 4 Used heavily during Analysis phase and are enhanced and refined during Design phase 6/16/2021 19

Sequence Diagram - Rent Movie : Checkout. Mgr : Cust: Customer : Inventory : Rented. Items Employee 1: find customer() 3: enter movie() 2: search (string) 4: search (string) Object Activation Message 5: rent (movie) 6: add(Cust, item) Lifeline 7: print. Invoice() 6/16/2021 8: generate. Rental. Total() 20

Package Diagram Class 6/16/2021 Package 21

Component Diagram Component Interface Dependency Note 6/16/2021 22

Deployment Diagram Node Communication Association 6/16/2021 23

Activity Diagram Start State Identify Caller Action State Obtain Name & Address Current Customer? Decision Open Account? [no] [yes] End State Create Account 6/16/2021 24

Swimlanes and Fork/Join Points Customer Identify Movie Manager Walking Clerk Fork Point Place Order 6/16/2021 Pay Collect Money Pickup Movie Deliver Movie Fill Order Join Point 25

State Diagram Guard Event Transition Activity State 6/16/2021 26

UML Diagram Usage 6/16/2021 27

Conclusion 4 UML is a robust notation that can express information gathered throughout a project’s lifecycle. 4 Adopting standard use of UML can improve communication between clients and Information Systems Service Providers. 4 UML can be used as an effective data modeling tool as well as an object modeling tool. 6/16/2021 28

Questions 6/16/2021 If I don’t know the answer, maybe I can make one up! 29

For more information… Contact: John T. Bell RWD Technologies Inc. 10480 Little Patuxent Parkway Columbia, MD 21044 Phone: 410 -884 -2453 email: jbell@rwd. com http: //www. rwd. com 6/16/2021 30
- Slides: 30