1 / 20

CSC291 - Software Engineering Concepts ( Fall 2018)

Explore the different relationship types in use case diagrams, including association, generalization, extend, and include. Learn how these relationships enable reuse and inheritance of behaviors between actors and use cases.

thiede
Download Presentation

CSC291 - Software Engineering Concepts ( Fall 2018)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC291 - Software Engineering Concepts(Fall 2018) Lecture 8 Use Case Diagrams-Relationships

  2. CSE291 - Introduction to Software Engineering Use Case Diagrams - Relationships There can be 5 relationship types in a use case diagram. • Association between actor and use case • Generalization of an actor • Generalization of a use case • Extend between two use cases • Include between two use cases

  3. CSE291 - Introduction to Software Engineering Use Case Diagrams - Relationships • Inclusion • Inclusion enables to reuse one use case's steps inside another use case. • Extension • Allows creating a new use case by adding steps to existing use cases • Generalization • Allows child use cases to inherit behavior from parent use cases

  4. CSE291 - Introduction to Software Engineering Association Between Actor and Use Case • An actor must be associated with at least one use case. • An actor can be associated with multiple use cases. • Multiple actors can be associated with a single use case.

  5. CSE291 - Introduction to Software Engineering Association Between Actor and Use Case

  6. CSE291 - Introduction to Software Engineering Generalization of an Actor • Generalization of an actor means that one actor can inherit the role of an other actor. • The  descendant inherits all the use cases of the ancestor.

  7. CSE291 - Introduction to Software Engineering Generalization of an Actor

  8. CSE291 - Introduction to Software Engineering Use Case Example (Actor-to-Actor relationship) generalized actor Cook specialized actor Mom Cook Father Cook

  9. student non-graduate student graduate student CSE291 - Introduction to Software Engineering Use Case Example (Actor-to-Actor relationship)

  10. parent child CSE291 - Introduction to Software Engineering Generalization of a Use Case • This is similar to the generalization of an actor. • The behavior of the ancestor is inherited by the descendant. • This is used when there are common behavior between two use cases and also specialized behavior specific to each use case. • For example in the previous banking example there might be an use case called “Pay Bills”. This can be generalized to “Pay by Credit Card”, “Pay by Bank Balance” etc.

  11. registration non-graduate registration graduate registration CSE291 - Introduction to Software Engineering Generalization of a Use Case Example

  12. CSE291 - Introduction to Software Engineering Extend Relationship Between Two Use Cases • As the name implies it extends the base use case and adds more functionality to the system. Here are few things to consider when using the <<extend>> relationship. • The base use case may stand alone. • The extending use case is dependent on the base use case. In the next diagram the “Calculate Bonus” use case doesn’t make much sense without the “Deposit Funds” use case. • The extending use case is usually optional and can be triggered conditionally. In the diagram you can see that the extending use case is triggered only for deposits over 10,000 or when the age is over 55.

  13. CSE291 - Introduction to Software Engineering Extend Relationship Between Two Use Cases

  14. CSE291 - Introduction to Software Engineering Include Relationship Between Two Use Cases • Include relationship show that the behavior of the included use case is part of the including (base) use case. • The included use case never stands alone. • In some situations this is done to simplify complex behaviors. Few things to consider when using the <<include>> relationship. • The base use case is incomplete without the included use case. • The included use case is mandatory and not optional.

  15. CSE291 - Introduction to Software Engineering Include Relationship Between Two Use Cases

  16. CSE291 - Introduction to Software Engineering Use Case – Example (Self Service Machine) Self service machine Buy a product customer Collect Money Collector Self service machine Restock Supplier

  17. Close Machine Open Machine Collect money CSE291 - Introduction to Software Engineering Use Case – Example (self service machine – includes relationship) <<includes>> <<includes>>

  18. CSE291 - Introduction to Software Engineering Case Study 1 Consider the online shopping case. The system provides the following functions: Registered Customers  uses some web site to make purchases online. Top level use cases are View Items, Make Purchase and Client Register. View Items use case could be used by new customers if they wants to find and see some products. This use case could also be used as a part of Make Purchase use case. Client Register use case allows customer to register on the web site, for example to get some coupons or be invited to private sales. Note, that Checkout use case is included use case not available by itself - checkout is part of making purchase. Draw its use case diagram.

  19. CSE291 - Introduction to Software Engineering Solution

  20. CSE291 - Introduction to Software Engineering Case Study 2 Consider the Airport Check-In and Security Screening. The system provides the following functions: Actors are Passenger, Tour Guides, Minor (Child), Passenger with Special Needs (e.g. with disabilities), all playing external roles in relation to airport business. Business use cases are Individual Check-In, Group Check-In (for groups of tourists), Security Screening, etc. - representing business functions or processes taking place in airport and serving the needs of passengers. Business use cases Baggage Check-in and Baggage Handling extend Check-In use cases, because passenger might have no luggage, so baggage check-in and handling are optional.

More Related