Use Cases

From EUDP
Revision as of 17:20, 27 September 2010 by Klaus (Talk)

Jump to: navigation, search

What

Use Case Analysis - an assessment and a selection of the use case candidates and actor candidates, a description of the selected candidates and finally drawing a use case diagram with use cases and actors.


How

The dish

Use Case Analysis

Ingredients

Process

Draw a Use Case Diagram

As a help to understand the user interaction with the system, the developer can use the use case diagram. Sometimes it helps to do this before the actual writing of the use cases, but it may also be a help to assess the use cases after they have been written.

You prepare the use case diagram by drawing the use cases as bubbles with names in a single column. At the left or the right side of the use cases you draw the different actors of the system. Draw lines from the actor to the use cases he/she/it participates in.

Assessment and Selection of Use Case Candidates

From the list of use case candidates and maybe the use case diagram you now choose which ones are most important and subsequently write them.

Unimportant use cases are usually the ones the developer knows exactly how to implement. A developer who develops e.g. web applications will not write a use case for the login process, because this is a standard procedure on websites, but perhaps the developer will write a use case which describes how a user would update the contents of the site.

When you have chosen the most important use cases, see if some of them contain more or less the same interaction with the system. Maybe these use cases should only be written as one use case? If two or more use cases have almost the same type of interaction with the system like entering data information into a form, it might be sufficient to write only one of them. How to write Use Cases

The developer has chosen which use cases are most important, and it is now time to write out the use case candidates. Write them as text (5 - 50 lines). Write from a user's (human or system) point of view how he/she/it would interact with the system-to-be.

The purpose of writing is to get as much possible knowledge about the system, so that you can estimate the development price of the system-to-be. Normally, this means that the developer only writes the most important success scenarios, and maybe a single fail scenario.

Do not write how to implement the functions, but write them as a use case, i.e. how to use the system.

Only write the use cases which help you understand the system better, and save the other ones until later in the development process.

Why

The main goal of this project phase is for the developer to get an idea of the range of the project, so it is possible to estimate the economics of the project.

Why is a use case important?

A use case is important for the developer if he/she wonders how this interaction with the system will accomplish. Therefore, the main purpose of writing a use case is to get a grip of the interaction with the system. Focusing on the difficult interactions often facilitate the solution!

The use case analysis helps gather all the different user aspects of the project. The developer assesses the importance of the different use cases and thereby he/she realises where some of the difficulties in the project are. By writing the success scenario, the developer transforms all the thoughts that he/she has in his/her mind to the paper. This way it is possible to focus on other aspects in the project, and maybe see new angles.

The use case diagram helps to get an overview of the actor interaction with the different use cases. It is a quick task to draw such a diagram, but it shows the most important actors which can be used later on in e.g. the user interface description.

Example

Configure week plan

Description:

The use case enables the user to set, on a daily basis, the time span in which the day temperature will be maintained. For each day, the user enters the time of day the temperature shall raise to normal level and the time at which the temperature will be lowered to night temperature. It is possible for the user to set only one temperature and let the setting repeat for the whole week.

Actors:

House occupier

Prerequisites:

Actor logged into the system.

Detailed Use Case:

Number Actor System
1 Selects the week plan configuration from the menu
2 Displays the week plan configuration
3 Enters start time for Monday and end time.
4 Selects that the setting should repeat through the whole week.
5 Clicks on the Save button
6 Stores the information repeating the setting for all days in the week in the database.
7 Displays the menu.

Used In

The Use Cases are used in the rest of the design phase as well as in the Realisation Phase. From here you may want to go to the Interface Analysis