Download presentation
Presentation is loading. Please wait.
Published byIrma Parsons Modified over 8 years ago
2
1 More About UML Todd Bacastow Penn State University Geospatial System Analysis & Design
3
2 What is the UML? Unified Modeling Language It is a modeling language, not a process In 1996, work on the UML was begun by Rational.
4
3 Representing System Architecture Conceptual Physical Logical ViewImplementation View Process ViewDeployment View Use Case View
5
4 Relationship Between Models and Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Collaboration Diagrams State Diagrams State Diagrams Component Diagrams Component Diagrams Component Diagrams Deployment Diagrams State Diagrams State Diagrams Object Diagrams Scenario Diagrams Scenario Diagrams Statechart Diagrams Use Case Diagrams Use Case Diagrams Sequence Diagrams State Diagrams State Diagrams Class Diagrams Activity Diagrams Models
6
5 Use Cases Describe interactions between users and computer systems (both called actors). Capture user-visible functions. Achieve discrete measurable goals. Are typically used during Analysis and Design.
7
6 Use Cases Actor A Your System Use Case Actor B Actor A Use case disgrams (UML) Use Case Actor C Data Interface Application Use case diagram Use case list Expended use case
8
7 Use Case Diagram Telephone Customer In-Store Customer Clerk Identify Movie Open Account Return Movie Customer Review Account Status Actor Use Case
9
8 Actors Anything that interfaces with the system (people, software, or other systems) Defined by their role –An actor may have multiple roles Not part of the system Actor A Your System Use Case Actor B Actor A Use case disgrams (UML) Use Case Actor C
10
9 Inheritance Dept Supervisor Use Case GIS Manager Use Case Dept Supervisor Use Case GIS Manager Use Case
11
10 “includes” and “extends” Draw Map Change Parcel Find Adjacent Add Right of Way >
12
11 Use Case Report The Use Case Report provides documentation for the Use Case. A Use Case is not complete without the report. The elements of the Use Case Report are shown on the right. Brief description Precondition Flow of events –Main flow –Subflows –Alternate flows Postcondition Special Requirements Enclosures –Diagrams –Pictures of the UI Brief description Precondition Flow of events –Main flow –Subflows –Alternate flows Postcondition Special Requirements Enclosures –Diagrams –Pictures of the UI
13
12 Class Diagrams Are the most fundamental UML Diagram. Describe the classes in the system, and the static relationships between classes. Class diagrams are used during Analysis, Design and Development.
14
13 UML Class Diagram DVD MovieVHS MovieVideo Game Rental Item Rental Invoice 1..* 1 Customer Checkout Screen 1 0..1 1
15
14 UML Class Diagram DVD MovieVHS MovieVideo Game Rental Item {abstract} Rental Invoice 1..* 1 Customer Checkout Screen 0..1 1 Simple Association Class Abstract Class Simple Aggregation Generalization Composition (Dependency) Multiplicity
16
15 Parts of a Class Classes can have four parts –Name –Attributes –Operations –Responsibilities Classes can show visibility and types. All parts but the Name are optional. MyClassName +SomePublicAttribute : SomeType -SomePrivateAttribute : SomeType #SomeProtectedAttribute : SomeType +ClassMethodOne() +ClassMethodTwo() Responsibilities -- can optionally be described here.
17
16 Object Diagrams An Object is an instance of a class. Object names are underlined. Object diagrams are similar to class diagrams. Many of the same notations are used. Object diagrams capture instances of classes, and allow the dynamic relationships to be shown. ThisOne : MyClassName +SomePublicAttribute : SomeType -SomePrivateAttribute : SomeType #SomeProtectedAttribute : SomeType +ClassMethodOne() +ClassMethodTwo()
18
17 Class and Object Diagrams 0..1 0..n Customer Rental Item Rents +name:string +id:integer +released:date +id:integer Joe: CustomerCasablanca: Movie +name:Joe Smith +id:1667 +released:1942 +id:22340 Class Diagram Object Diagram Class Name Object Name Attributes Association Name
19
18 Collaboration Diagrams Collaboration diagrams describe interactions and links Focus on exchange of messages between objects Appears during Analysis phase Enhanced during Design phase
20
19 :Check-out Manager :Customer :Inventory 1: enter_customer() 3: enter_movies() 5: add(customer, movies) 7: print invoice() 2: IsValidCust(CustId) 4:GetMovieByBarcode() Collaboration Diagram :Clerk Object Message :Rented Items 8: generateRentalTotal()
21
20 Sequence Diagrams Can be “morphed” from Collaboration Diagrams. Describe interactions between objects arranged in time sequence Focus on objects and classes involved in the scenario and the sequence of messages exchanged Associated with use cases Used heavily during Analysis phase and are enhanced and refined during Design phase
22
21 Sequence Diagram 1: find customer() 2: search (string) 4: search (string) 6: add(Cust, item) 3: enter movie() 5: rent (movie) 7: printInvoice() 8: generateRentalTotal() Object Lifeline Activation Message :CheckoutMgr:InventoryCust:Customer:RentedItems : Employee
23
22 Package Diagram Class Package
24
23 Component Diagram Component Interface Dependency Note
25
24 Node Communication Association Deployment Diagram
26
25 Identify Caller Create Account Obtain Name & Address Open Account? Current Customer? [no] [yes] Action State Start State Decision End State Activity Diagram
27
26 Identify Movie Place Order Place Order Fill Order Pay Deliver Movie Pickup Movie CustomerManagerWalking Clerk Fork Point Join Point Collect Money Swimlanes and Fork/Join Points
28
27 State Diagram State Transition Activity Guard Action Event
29
28 UML Diagram Usage
30
29 Conclusion A notation that can express information gathered throughout a project’s lifecycle. Adopting standard use of UML can improve communication between clients and developers. UML can be used as an effective data modeling tool as well as an object modeling tool.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.