Professional Documents
Culture Documents
Week 3 Lecture
Week 3 Lecture
Week 3 Lecture
In our class:
• human actor’s initiate use case
• external system actors can participate in middle of
use case initiated by human actor
• Use case occurs in single session, e.g., request
holiday vs. approve holiday are separate use cases
Are these same or different use
cases?
request holiday; approve holiday
The roles in organization give you an idea for possible actors in your use case
scenario. Whom you choose to be an actor may be a specific job title,
‘Accountant’, or can be general ‘Creative staff’.
4
Remember, external systems can be actors too.
Existing and Proposed
Systems
Existing system:
client management
• record names
• assign client contact
• campaign
staff management
• names, grades, bonuses
Redevelop existing system in Java,
more functions
5
Notes from the meeting
A record is kept of each client company and each client company has one person who is the
contact person. Contact person’s name and contact details are kept in the client record.
Agate nominates a member of staff to be the contact for each client.Clients have
advertising campaigns and a record is kept of every campaign.
One member of Agate’s staff manages each campaign. Staff may be working on more than
one project at a time. For each project they work on, they are answerable to the manager
of that project. When a campaign starts:
When a campaign starts, the manager estimates the likely cost agreed with by client.
Campaign’s finish date may be set at any time,and may be changed.
When the client pays, the payment date is recorded.
Each campaign includes one or more adverts. There are several types of adverts: Newspaper
adverts, Magazine adverts, Internet adverts, TV adverts, Radio Adverts
Puchasing assistants are responsible for buying space in newspapers and magazines and so
on.
The actual cost of a campaign is calculated from a range of information such as the costs of
staff time, studio time and actors, copyright material, space in newspapers
• campaign
staff management
• names, grades, bonuses
Redevelop existing system in Java,
more functions
12
Existing and Proposed
Systems
Existing system: Add a new
client
client management
• record names Assign staff to work
• assign client contact on campaign
• campaign
Add a new
staff management campaign
• names, grades, bonuses
Redevelop existing system in Java,
more functions
13
Notation of Use Case Diagrams
Communication associations
Add a new
client
Add a new
campaign
Campaign Assign staff to work
Manager on campaign
14
Notation of Use Case Diagrams
Subsystems (also called subjects)
drawn as a rectangle around a group of use cases
that belong to the same subject
in a CASE tool, use cases for different subjects are
usually placed in separate use case diagrams
Add a new
client
Add a new
campaign
Campaign Assign staff to work
Manager on campaign
15
Use case diagrams
for Agate Add a new
client
Add a new
campaign
Assign staff to work
Campaign on campaign
Manager Add a new advert
to a campaign
Record completion
of a campaign
Assign a staff
contact
Change a
client contact
16
Additional descriptions/notations
Each use case (ellipse) and actor (stick figure) is
usually accompanied by a textual actor and use
case description. This can be brief description, or
can be a step-by-step breakdown of the interaction
between the actor and system
17
Use Case Diagrams will often be accompanied
by more detailed descriptions of actor and use
case
Add new
advert to
campaign
Campaign
Manager
18
Actor Description Add new
advert to
campaign
Campaign
Manager
Campaign Manager
A Campaign manager is either a Director or an
Account Manager. They are responsible for
estimating the campaign cost and agreeing it with
the client. They are responsible for assigning staff
to the team and supervising their work, managing
the progress of the campaign, conducting any
further budget negotiations, and authorizing the
final invoice.
19
Agate Use Cases and Descriptions
Add a new A campaign can consist of many adverts. Details of
advert to a each advert are entered into the system, including
campaign advert cost
Record When a campaign is completed, the actual
completion of completion date and cost are entered. A record of
a campaign completion form is printed out for the Accountant as
the basis for invoicing the client
Assign a Clients have a member of staff assigned to them
staff contact as their particular contact person.
Change a Records when the client’ s contact person with
client Agate is changed.
contact
20
Agate Use Cases
Record When an advert is completed, the actual date is
completion entered.
of an advert
Add a new When Agate obtains a new client, the full details of
client the client are entered. Typically this will be because
of a new campaign, and therefore the new
campaign will be added straight away.
Add a new When Agate gets the business for a new campaign,
campaign details of the campaign are entered, including the
intended finish date and the estimated cost. The
manager for that campaign is the person who
enters it.
Assign staff to When a new campaign starts, members of staff are
work on a assigned to work on it.
campaign
21
Add a new
member of staff
Record client
payment
22
Accountant Use Case descriptions
Add a new member of staff
When a new member of staff joins Agate, his or her details are
recorded. He or she is assigned a staff number, and the start date is
entered. Start date defaults to today’ s date. The starting grade is
entered.
23
Accountant Use Case descriptions
Add a new staff grade
24
Accountant Use Case descriptions
Add a new staff grade
Occasionally a new grade for a member of staff must be added. The
name of the grade is entered. At the same time, the rate for that
grade and the rate start date are entered; the date defaults to today’
s date.
25
Accountant Use Cases
26
Good Use Cases
Identifying use cases
do not distinguish too many, especially at
first
Title
verb and noun combination
Language
‘user’ language, not computer-speak
avoid ‘click’, ‘input’, ‘menu box’
27
Use Case Diagram for Agate System
Note: Accountancy Use Cases and Creative Staff Use Cases are shown in different boxes because the
separate boxes denote different sub-systems of the overall system.
Detailed Description of a
Use Case
• add more detail
• describes what the system should do: inputs and
outputs, i.e., what the actor sees happening
• Does NOT describe coding, data storage structures
• following a template,
• Unlike Use Case diagram, no universal template
29
Suggested Detailed Use Case
Description Template
Use case name
Description
Precondition: required starting state of system
(optional)
Normal flow of events (actions and system
responses)
Alternative flows (optional)
Postcondition: ending state of system (optional)
Exceptions (optional)
30
Suggested Detailed Use Case
Description Template
Use case name
Description
31
Suggested Detailed Use Case
Description Template
Use case name Add new advert to campaign
Description
A campaign can consist of many adverts. Details of
each advert are entered into the system, including
advert cost
32
Suggested Detailed Use Case
Description Template
Use case name Add new advert to campaign
Description
A campaign can consist of many adverts. Details of
each advert are entered into the system, including
advert cost
Normal Flow:
33
Add new
Use cases get more detailed as advert to
analysis progresses campaign
Campaign
Manager
less detail
37
Detailed Use Case Description:
Alternative Flow
Variation to some steps of the normal flow
Alternative flow allows several related
scenarios to be combined
• Admin. enters the • Admin updates the
student details student details
41
Additional descriptions for use
cases: Pre- and Postconditions
-Precondition
must be true for use case to be possible
-Postcondition
how the system is changed by the interaction
e.g. ‘customer order is recorded’
may be slight repeat of last line of flow
Each alternative/exception flow may have
own postcondition
42
-Additional Use Case notations:
-include
-extend
-Actor generalisation
44
Use case: Assign staff to work on campaign
1. Campaign manager indicates wanting to assign staff to campaign
2. System shows a list of clients
3. Campaign manager chooses relevant client
4. System shows list of campaigns for that client
5. Campaign manager choose relevant campaign
6. System shows list of staff
7. Campaign manager choose staff to work on campaign Same steps:
8. System records staff as working on campaign “Find
Use case: Add advert to campaign (expanded from last week) Campaign”
1. Campaign manager indicates they want to add advert
2. System shows a list of clients
3. Campaign manager chooses relevant client
4. System shows list of campaigns for that client
5. Campaign manager choose relevant campaign
6. System displays campaign budget, costs of adverts paid for and not paid
for
7. Campaign manager enters details of advert including estimated cost.
8. System checks campaign is within budget. If so, it creates new advert and
«include»
Assign staff to
Work on a Campaign «includes»
Find Campaign
46
Detailing «include»
Use case: Update widget details • Informal approach – not
too much ‘apparatus’
Description: Update the details about
the widget
Normal flow:
Use case: Find Widget Details
1. Widget details are displayed with
‘Find Widget Details’
Description: Display the basic details
2. User enters new widget price
about the widget
3. …..
Normal flow:
1. User requests list of widgets
2. System displays the available widgets
3. User chooses the widget identifier
Possible template for 4. System displays widget details
included use case
47
«extend»
Basic Use Case
Extension Point
«extend» «extend»
Extension A Extension B
48
Detailing «extend»
Use case: Display details
• Informal approach – not
Description: Display the basic details
too much ‘apparatus’
Normal flow:
1. User enters widget name
2. System displays the details Use case: Confidential display
«extends» «extends»
Campaign Accountant
Manager
Print Campaign Print Campaign
Summary Invoice
50
Actor Generalisation
Some actors
represent roles which
generalise another
Staff Member
role
Use cases available to
the ‘Staff Member’ are
also available to the
‘Campaign Manager’
Campaign Staff Contact
Manager
51
What is vs. is not a use case for
QMPLUS?
• help student No too vague
• enter password No too detailed
• create username No too detailed
• upload coursework Yes
• create quiz Yes
• write code for system No, use cases are actor
interactions, not building
system
No, this is part of ‘attempt
• save quiz
quiz’