Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Based on Chapter 6: Section 6.6-6.8 Bennett, McRobb and Farmer Object Oriented Systems Analysis and Design Using UML 4th Edition, McGraw Hill, 2010
2010 Bennett, McRobb and Farmer 1
Last Lecture
What is a model? A simplified representation that helps us understand something more complicated, e.g., a tube map
Different types of models used to provide different views of same system, e.g., a person is modelled by a photo, an x-ray, a model of preferences Models range in level of detail: As IS development proceeds, models become more detailed
Diagrams are standardized visual representations used to communicate models. Many diagrams can serve to convey a single model, e.g. a model of a solar system may be conveyed with many diagrams.
2
Requirements List
Interface Prototypes
extend
extend
Use Cases
Accountant
Glossary
10
Requirements lists
How prototyping can be used with use case modelling
11
12
Actor
Requirements as Scenarios
14
What is a Scenario?
Possible interaction between a system and its users Specific scenario
specific data values at each step in the interaction test case
Generalised scenario
cover many specific scenarios
Mrs H wants to register a new student for Computer Science Mrs H enters the student details
A. Patel lives at 29 Devon Lane, Surbiton
Specific Scenario
The system
allocates A. Patel student id 123456789 records A. Patels registration details prints A. Patels course registration form, with the first year G500 recommended programme
16
Generalised Scenario
Administrator wants to enter a student registration Administrator enters the student details
name, address
The system
generates a student id number records details of the student prints the course registration form, with the recommended programme, if any
17
Real
Administrator chooses the UCAS course code form a drop-down box, with an others option which allows the course code and the description
19
Use Cases
Generalised and essential scenarios Number of use cases
up to 80 for complex systems 20 to 50 for most systems
Diagram
very simple and abstract standardised in UML
Description
structured text, not standardised
20
Campaign Manager
Accountant
communication association
21
22
23
Agate Organisation
Agate Ltd Board of Directors Administration Accounts Accountant Credit Controller
Accounts Clerks
Computing
Purchasing Assistant
24
Existing system:
client management
record names assign client contact campaign
staff management
names, grades, bonuses
Computing
Purchasing Assistant
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.
26
drawn as ellipses with a name in or below each ellipse describe a sequence of actions that the system performs to achieve an observable result of value to an actor the name is usually an active verb and a noun phrase
27
line drawn between an actor and a use case represent communication link between an instance of the use case and an instance of the actor
28
Examples
30
Campaign Manager
Staff Contact
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 These descriptions are added using the program you are using to draw UML diagrams
32
Use Case Diagrams will often be accompanied by more detailed descriptions of actor and use case
Campaign Manager Add new advert to campaign
So for above Use Case, additional screens in CASE tool will show the following descriptions:
Campaign Manager
Detailed description
Detailed description
33
Actor Description
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.
34
35
When Agate gets the business for a new 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. When a new campaign starts, members of staff are assigned to work on it.
36
Accountant
38
39
40
Record client payment. When a client pays for a campaign, the payment amount is checked against the actual cost and the date paid is entered.
41
Title
verb and noun combination
Language
user language, not computer-speak avoid click, input, menu box
42
Normal Flow
Normal flow (or path)
steps of the interaction distinguish between the users request and the systems response
request
actor
response
system
44
Campaign Manager
Use case description: Add a New Advert to a Campaign Actor Action 1. Campaign manager checks campaign budget. System Response 2. Displays campaign budget, total cost of adverts paid for and total estimated cost of adverts not paid for. Creates new advert and adds to list of adverts for that campaign.
3.
4.
Alternative Courses Step 4. The advert will exceed the budget and a budget extension request is generated.
45
In comparison: A more general Use Case description. Use cases get more detailed as analysis progresses
Campaign Manager
A campaign can consist of many adverts. Details of each advert are entered into the system, including advert cost
46
Caution
some versions of Use Cases dont have exceptions dont have too many exceptions
48
Postcondition
how the system is changed by the interaction applies to all alternatives e.g. customer order is recorded
49
For analysis:
abstract as possible avoid user interface details
53
55
include
Common steps can be included in other use cases Common steps documented as a normal use case Referenced by name in using use case
A
include
Common Sequence
include B
56
include
Assign staff to Work on a Campaign
includes
Find Campaign
Campaign Manager Add a New Advert to a Campaign includes
57
Detailing include
Use case: Update widget details Description: Update the details about the widget Normal flow: 1. Widget details are displayed with Find Widget Details 2. User enters new widget price 3. ..
58
extend
Basic Use Case Extension Point
extend
extend
Extension A
Extension B
One use can extend the functionality of another Extension may be available to another actor
59
Detailing extend
Use case: Display details Description: Display the basic details Normal flow: 1. User enters widget name 2. System displays the details Extension points: When the system displays details (step 2): Print details Confidential display
extends
Check Campaign Budget
System Displays Balance
Campaign Manager
extends
extends
Accountant
61
Actor Generalisation
Some actors represent roles which generalise another role Use cases available to the Staff Member are also available to the Campaign Manager
Staff Member
Campaign Manager
Staff Contact
62
63
64
Development increments
implement, test & deliver sets of use cases
65
66
67
Prototyping
Use case modelling can be supported with prototyping Prototypes can be used to help elicit requirements Prototypes can be used to test out system architectures based on the use cases in order to meet the non-functional requirements
68
Prototyping
For user interface prototypes, storyboarding can be used with handdrawn designs
69
Prototyping
User interface prototypes can be implemented using languages other than the one that the system will be developed in
Campaign Selection Holborn Motors Lynch Properties Yellow Partridge Zeta Systems Campaign Selection Campaign Selection Holborn Motors Lynch Properties Yellow Partridge Zeta Systems Spring Jewellery Campaign 2003 Spring Jewellery Campaign 2004 Spring Jewellery Campaign 2005 Summer Collection 2004 OK Quit Client: Client: Client: Holborn Motors Lynch Properties Yellow Partridge Zeta Systems Spring Jewellery Campaign 2003 Spring Jewellery Campaign 2004 Spring Jewellery Campaign 2002 Spring Jewellery Campaign 2005 Summer Collection 2004 OK Quit
Campaign:
Campaign:
Campaign:
OK
Quit
Dialogue initialized.
70
Summary
In this lecture you have learned about: The purpose of use case diagrams The notation of use case diagrams How to draw use case diagrams How to write use case descriptions How prototyping can be used with use case modelling
71