Presentation is loading. Please wait.

Presentation is loading. Please wait.

Uml and Use Cases CS 414, Software Engineering I Mark Ardis Rose-Hulman Institute January 9, 2003.

Similar presentations


Presentation on theme: "Uml and Use Cases CS 414, Software Engineering I Mark Ardis Rose-Hulman Institute January 9, 2003."— Presentation transcript:

1 Uml and Use Cases CS 414, Software Engineering I Mark Ardis Rose-Hulman Institute January 9, 2003

2 2 Outline UML Use cases Sequence diagrams Activity diagrams How to write use cases

3 3 Note About Slides Some of these slides are from a course by Rational Software Corp. Some of these slides are from Alastair Cockburn Please respect their copyrights

4 4 What Is the UML? The Unified Modeling Language (UML) is a language for Specifying Visualizing Constructing Documenting the artifacts of a software-intensive system

5 5 UML History

6 Inputs to UML Fusion Operation descriptions, Message numbering Meyer Before and after conditions Harel State charts Wirfs-Brock Responsibilities Embley Singleton classes, High-level view Odell Classification Shlaer - Mellor Object Lifecycles Gamma, et.al Frameworks, patterns, notes Booch Jacobson Rumbaugh

7 7 The UML Provides Standardized Diagrams Deployment Diagram Deployment Diagram Use Case Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Scenario Diagrams Scenario Diagrams Sequence Diagrams Sequence Diagrams State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams State Diagrams Component Diagrams Component Diagrams Component Diagrams Component Diagrams Component Diagrams Component Diagrams Model State Diagrams State Diagrams State Diagrams State Diagrams Object Diagrams Object Diagrams Scenario Diagrams Scenario Diagrams Scenario Diagrams Scenario Diagrams Collaboration Diagrams Collaboration Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Activity Diagrams Activity Diagrams State Diagrams State Diagrams State Diagrams State Diagrams Class Diagrams Class Diagrams

8 8 UML Diagrams Are Key System Artifacts Actor A Use Case 1 Use Case 2 Actor B Document FileManager GraphicFile File Repository DocumentList FileList Customer name addr withdraw() fetch() send() receive() > Forward Engineering(Code Generation) and Reverse Engineering Executable System User Interface Definition Domain Expert Use Case 3 Source Code edit, compile, debug, link Use-Case Diagram Class Diagram Collaboration Diagram Sequence Diagram Component Diagram State Diagram Package Diagram Deployment Diagram Class

9 9 Rational Unified Process (RUP) Management Environment Business Modeling Implementation Test Analysis & Design Preliminary Iteration(s) Iter. #1 Phases Process Workflows Iterations Supporting Workflows Iter. #2 Iter. #n Iter. #n+1 Iter. #n+2 Iter. #m Iter. #m+1 Deployment Configuration Mgmt Requirements ElaborationTransitionInceptionConstruction

10 10 Business Modeling Workflow

11 11 Requirements Workflow

12 12 Analysis & Design Workflow

13 13 Outline UML Use cases Sequence diagrams Activity diagrams How to write use cases

14 14 Use-Case Name Brief description Flows of Events Relationships Activity and State diagrams Use-Case diagrams Special requirements Preconditions Postconditions Other diagrams Use-Case Reports... Use Case Model Actors Use Cases

15 Example Use-Case Diagram Submit Grades Professor View Report Card Select Courses to Teach Student Course Catalog Register for Courses Maintain Student Information Maintain Professor Information Registrar Billing System Close Registration Login

16 16 Use-Case Flows of Events Has one normal, basic flow ("Happy Path" or "Sunny Day Scenario") Several alternative flows Regular variants Odd cases Exceptional flows handling error situations “Happy Path”

17 What Are Scenarios ? A scenario is an instance of a use case

18 18 Checkpoints: Actors Have all the actors been identified? Is each actor involved with at least one use case? Is each actor really a role? Should any be merged or split? Do two actors play the same role in relation to a use case? Do the actors have intuitive and descriptive names? Can both users and customers understand the names?

19 19 Checkpoints: Use-Cases Is each use case involved with at least one actor? Is each use case independent of the others? Do any use cases have very similar behaviors or flows of events? Do the use cases have unique, intuitive, and explanatory names so that they cannot be mixed up at a later stage? Do customers and users alike understand the names and descriptions of the use cases?

20 A First Step Towards Executables Use CasesAnalysis Classes Source Code ExecDesign Classes

21 21 Use Case Realization Use CaseUse Case Realization > Class Diagrams Sequence Diagrams Collaboration Diagrams Use Case Realization Documentation Use Case ModelDesign Model

22 22 Outline UML Use cases Sequence diagrams Activity diagrams How to write use cases

23 23 Example: Sequence Diagram : Student : Maintain ScheduleForm : Registration Controller : Schedule : MainForm : CourseCatalog System 5: // select 4 primary and 2 alternate offerings( ) 6: // add courses to schedule( ) 7: // create with offerings( ) 1: // select maintain schedule( ) 2: // open schedule form( ) 3: // get course offerings( ) 4: // get course offerings( )

24 24 AF3 One Interaction Diagram Not Good Enough Alternate Flow 4Alternate Flow 5Alternate Flow n Alternate Flow 1Alternate Flow 2Alternate Flow 3 AF1 AF2 Basic Flow

25 25 Outline UML Use cases Sequence diagrams Activity diagrams How to write use cases

26 26 Select Course Check Schedule Check Pre-requisites Assign to Course Resolve Conflict Update Schedule [checks completed] [checks failed] [student added to course] Example: Activity Diagram

27 27 Outline UML Use cases Sequence diagrams Activity diagrams How to write use cases

28 28 Cartoon of the Day

29 29 Switch to other talk...


Download ppt "Uml and Use Cases CS 414, Software Engineering I Mark Ardis Rose-Hulman Institute January 9, 2003."

Similar presentations


Ads by Google