IT Skills Use Case Diagrams
Objectives Richard Hancock Define what a use case is Describe the common elements of a use case diagram Be able to draw a use case diagram Differentiate between include and extend relationships ***
What is a Use Case? Richard Hancock A use case describes how a type of user called an actor uses a system to achieve a goal Example Jisun wants to create a user account for our online photo application. To do that she goes to our website and sees a hyperlink called “Create Account”. Clicking that she is prompted for her desired username, a password and her address. After she provides this information, an active account is created and she is logged onto the website. Three things are needed in order to describe a use case: 1. The actor/s involved 2. The system being used 3. The goal the actor achieves in using the system (the reason for the system)
The Actor Richard Hancock The actor describes a role that users play in relation to the system; all we care about is what their relationship to the system is The actor is external to the system Actors do not have to be people, they can be other systems The goal must be of value to the actor ***
Use Case Diagram Richard Hancock The purpose of a use case diagram is to show what functions serve an actor Actor is always outside the system boundary
ATM Example Richard Hancock
Relationships - Include Richard Hancock Book Assessment and Book Lesson include Check Availability of Tutors This means if you book an assessment you must also check availability of tutors > should point towards the use case being included
Relationship - Extend Richard Hancock The flow of the extended use case Order Wine is only included under certain conditions So, Order Food can be extended with Order Wine, meaning you do not have to order wine with your food, it’s optional > should point towards the use case/s being extended, not the extending use case
Applying Use Cases Richard Hancock Identify the actors – who will use the system? Identify their goals – what will they be using the system to do? In trying to identify goals, what distinct workflows or outcomes might we need to consider? ***
Summary Richard Hancock Use case diagrams graphically show how a type of user called an actor uses functions in a system to achieve a goal Diagrams are made up of the actor, the use case, relationships and a system boundary Actors are always external to the system containing the use cases > relationship means to always include > relationship means to conditionally include Make sure the arrows are going the right way > should point towards the use case being included > should point towards the use case/s being extended, not the extending use case ***
Questions… Richard Hancock …are there any?
Resources Richard Hancock Use Case Diagrams Use Case Diagrams More Use Case Diagrams More Use Case Diagrams Unified Modelling Language Unified Modelling Language
Exercise Richard Hancock Develop a use case diagram for ordering an item from a catalogue company (e.g. Argos) and paying for it Assume that you are in the store ready to pick up the item Assume the item is in stock Assume the item does not need to be home delivered 1. Think about the different actors involved 2. Try to think about their activities in fulfilling the order 3. Think about the goals
Richard Hancock End!