160 likes | 403 Views
IT Skills. Use Case Diagrams. Objectives. 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?.
E N D
IT Skills Use Case Diagrams
Objectives • 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 *** Richard Hancock - 2010
What is a Use Case? • 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 email 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: • The actor/s involved • The system being used • The goal the actor achieves in using the system (the reason for the system) Richard Hancock - 2010
The Actor • 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 *** Richard Hancock - 2010
Use Case Diagram • The purpose of a use case diagram is to show what functions serve an actor • Actor is always outside the system boundary Richard Hancock - 2010
ATM Example Richard Hancock - 2010
Relationships - Include • Book Assessment and Book Lesson include Check Availability of Tutors • This means if you book an assessment you must also check availability of tutors • <<include>> should point towards the use case being included Richard Hancock - 2010
Relationship - Extend • 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 • <<extend>> should point towards the use case/s being extended, not the extending use case Richard Hancock - 2010
Applying Use Cases • 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? *** Richard Hancock - 2010
Summary • 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 • <<include>> relationship means to always include • <<extend>> relationship means to conditionally include • Make sure the arrows are going the right way • <<include>> should point towards the use case being included • <<extend>> should point towards the use case/s being extended, not the extending use case *** Richard Hancock - 2010
Questions… • …are there any? Richard Hancock - 2010
Resources • Use Case Diagrams • More Use Case Diagrams • Unified Modelling Language Richard Hancock - 2010
Exercise • 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 • Think about the different actors involved • Try to think about their activities in fulfilling the order • Think about the goals Richard Hancock - 2010
End! Richard Hancock - 2010