UML Saman A. Barakat saman.barakat@gmail.com Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015
Outline What is Use Case Diagram Use Case Elements Learn how to create a Use Case Diagrams Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 2
What is a use case? Use Case Diagrams A use case capture the functional requirements of the system. Use case describes the interaction between various actors and the system Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 3
Actors: Use Case Elements Actor in a use case diagram is any entity that performs a role in one given system. This could be a person, organization or an external system and usually drawn like skeleton shown below Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 4
Use Case Use Case Elements A use case represents a function or an action within the system. Its drawn as an oval and named with the function. Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 5
System Use Case Elements System is used to define the scope of the use case and drawn as a rectangle. This an optional element but useful when your visualizing large systems. Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 6
Relationships in Use Case Diagrams There are four types of relationships in a use case diagram: 1. Association between an actor and a use case 2. Generalization of an actor &a use case 3. Extend relationship between two use cases 4. Include relationship between two use cases Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 7
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 8 Relationships in Use Case Diagrams Association: communication between an actor and a use case; Represented by a solid line. Generalization: relationship between one general use case and a special use case (used for defining special alternatives) Represented by a line with a triangular arrow head toward the parent use case.
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 9 Relationships in Use Case Diagrams
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 10 Relationships in Use Case Diagrams Include: a dotted line labeled <<include>> beginning at base use case and ending with an arrows pointing to the include use case. The include relationship occurs when a chunk of behavior is similar across more than one use case. Use include in stead of copying the description of that behavior. <<include>>
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 11 The <<includes>> Relationship
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 12 Relationships in Use Case Diagrams Extend: a dotted line labeled <<extend>> with an arrow toward the base case. The extending use case may add behavior to the base use case. The base class declares extension points. <<extend>>
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 13 The <<extends>> Relationship
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 14 Example
Saman A. Barakat saman.barakat@gmail.com Date: 21 October 2015 Slide: 15 Example