Slide 1

Slide 1 text

CSE360 Introduction to Software Engineering Lecture 10: Use Cases Javier Gonzalez-Sanchez [email protected] javiergs.engineering.asu.edu Office Hours: By appointment

Slide 2

Slide 2 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 2 Where we are? Process Requirements Concepts functional non-functional Specification user stories natural language (agile) use cases diagrams (UML) * SRS Planning Modeling Coding Deployment

Slide 3

Slide 3 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 3 Introducing UML

Slide 4

Slide 4 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 4 Use Case Diagrams • Use case –put the title of one requirement inside. Use cases capture requirements. • Actor –put the name of an actor at the bottom side. An actor specifies a role played by an external entity requirement title actor name

Slide 5

Slide 5 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 5 Inheritance • Generalization/Specialization (Inheritance) – used when there is common behavior between two use cases and also specialized behavior specific to each use case. • Generalization/Specialization (Inheritance) –of an actor means that one actor can inherit the role of the other actor

Slide 6

Slide 6 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 6 Association • Association – between an actor and a use case indicates that the actor and the use case somehow interact or communicate with each other.

Slide 7

Slide 7 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 7 Inclusion • Show that behavior of the included use case (addition) is inserted into the behavior of the including (base) use case. • A dashed line with an open arrowhead directed from the including use case (base) to the included (addition) use case. The arrow is labeled with the keyword «include». • The include relationship is used to (1) simplify large use case by splitting it into several use cases, (2) extract common parts of the behaviors of two or more use cases. base addition

Slide 8

Slide 8 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 8 Extension • Extending use case defines optional behavior that is not necessarily meaningful by itself. • Extend relationship is shown as a dashed line with an open arrowhead directed from the extending use case to the extended (base) use case. The arrow is labeled with the keyword «extend». base extension

Slide 9

Slide 9 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 9 Example 1

Slide 10

Slide 10 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 10 Example 2

Slide 11

Slide 11 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 11 Example 3

Slide 12

Slide 12 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 12 Example 4

Slide 13

Slide 13 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 13 Example 5

Slide 14

Slide 14 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 14 Example 6

Slide 15

Slide 15 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 15 Example 7

Slide 16

Slide 16 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 16 Example 8 http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/examples/uc_model_elaboration_phase_70035F60.html

Slide 17

Slide 17 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 17 Example 9

Slide 18

Slide 18 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 18 Example 10

Slide 19

Slide 19 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 19 Rules for Use Cases • Titles begin with a verb – A use case models an action so the name should begin with a verb. • Make the name descriptive – This is to give more information for others who are looking at the diagram. For example “Print Invoice” is better than “Print”. • Highlight the logical order – For example if you’re analyzing a bank customer typical use cases include open account, deposit and withdraw. Showing them in the logical order makes more sense. • Place use cases to the right of the primary actor and to the left of secondary actors • Place inheriting use case below parent use case

Slide 20

Slide 20 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 20 Rules for Actors • Give meaningful business relevant names for actors • Actors model roles (not positions) • External systems are actors • Actors don’t interact with other actors • Place inheriting actors below the parent actor

Slide 21

Slide 21 text

Javier Gonzalez-Sanchez | CSE360 | Summer 2017 | 21 Homework Chapter 4

Slide 22

Slide 22 text

CSE360 – Introduction to Software Engineering Javier Gonzalez-Sanchez [email protected] Summer 2017 Disclaimer. These slides can only be used as study material for the class CSE360 at ASU. They cannot be distributed or used for another purpose.