Week 2 Lecture
Week 2 Lecture
House
Building
Plan to Plan
Building a House
• Family
– describes what they want: requirements
• Architect
– prepares a plan
• Builder
– builds according to the plan
• The plan is critical
– family know what they will get
– builder knows what to build
THE SAME IN COMPUTING, BUT ...
System Description
Analyst / Dream System
Designer Ideas Initial concept
What do these
look this?
Plan/Specification
Coder Actual
System
Specifications
• Specifications describe exactly what a
system must accomplish
• A specification is often a plan or model
of the required system
An Abstract View of a System
behaviour System input
Boundary
System
System output
Environment
purpose, or business goal
Key part of software engineering
is Information Systems Analysis
-Purpose
-Behaviour
-Code architecture
What is involved in software
engineering?
Integrating Three Perspectives
• Users
• Business (owner/client/sponsor)
• Software Developers
Software requirements serve as a model
of the system
10
What is a Model?
• Like a map, a model represents something
else
• A useful model has the right level of detail
and represents only what is important for
the task in hand
11
What is a Diagram?
• Diagram is a visual representation of a part of a model
• Diagram to model is like paragraph to a story.
• Abstract shapes are used to represent things or actions
from the real world 40°
• Diagrams follow rules or standards
• The standards promote communication and make sure
that different people will interpret the diagram in the
same way
• Diagrams help information analysts to communicate
ideas and to understand structures and relationships in
the system
12
Author Reviewer Typesetter Printer
An Example
of a Diagram Write Chapter
Review Chapter
in producing a
Typeset Book
Reset Book
Print Book
13
Author Reviewer Typesetter Printer
Plan Chapter
Review Chapter
Revise Draft
Revise Chapter
[book
[not not
satisfied]
complete]
[satisfied]
[book complete]
Add Exercises
Typeset Book
Add References
to Bibliography
Correct Proofs
Reset Book
Print Book
14
UML is a language for making
systems models using diagrams
An analogy
• To Write an Essay • To model a system
• Use English grammar to • Use UML to draw diagrams,
use cases, class diagrams,
write sentences collaboration diagrams etc.
• Sentences made up of • Diagrams made up of 2D
words, punctuation, phrases symbols, icons, arrows, paths
• Use Microsoft Word to form (lines)
sentences that are • Use Computer Aided Software
consistent with English Engineering (CASE) tools to
grammar draw diagrams that are
consistent with UML
16
Diagrams in UML
• UML diagrams consist of:
• icons
Plan Chapter
• two-dimensional symbols
Produce
• paths First Draft
• Strings (text)
Revise Draft
[not satisfied]
Add Exercises
17
The different types of UML diagrams
18
In this module we will cover:
20
Computer Aided Software
Engineering tools
• CASE (computer-aided software
engineering) tools Computer Aided
Software Engineering (CASE) tools
allow you to model Information
Systems by drawing diagrams
• typically provide a range of features
including:
• checks for syntactic correctness (e.g.
UML);
• repository support;
• checks for consistency and
completeness;
• navigation to linked diagrams;
21
Developing Models of systems
• During the life of a project using an
iterative life cycle, models change along
the dimensions of:
• abstraction—they become more concrete
• formality—they become more formally
specified
• level of detail—additional detail is added as
understanding improves
22
Types of Requirements
• Functional
• Non-functional
• Usability
Functional Requirements
• Describe what a system must do
• Include:
– processes system will carry out
– Types of inputs and outputs with users and other
systems
– what types of data system will be holding
27
Notation of Use Case Diagrams
Check email
User
28
Notation of Use Case Diagrams
An actor is
user of the system
Campaign
initiates the interaction Manager
29
Good Use Cases
Identifying use cases
• do not distinguish too many, especially at first
• verb and noun combination
• use language that reflects user’s perspective (not
computer-speak)
• a ‘complete task’ from user’s perspective
Send Email
Use Case Diagram
use case
actor
Upload assignment
Post assignment
Student
Post to Forum
Lecturer
communication
association
32
Use Case Diagram: book a car
Car rental system
cancel booking
register rental
agreement
Customer
Send bill
Payment
Processing Process Payment
System
Use Cases
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
34
Use Case Practice: Agate
Advertising Agency
Organisation’s roles may inform choice
of actors
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’.
37
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
38
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
45
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
46
Notation of Use Case Diagrams
Communication associations
Add a new
client
Add a new
campaign
Campaign Assign staff to work
Manager on campaign
47
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
48
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
49
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
50
Use Case Diagrams will often be accompanied
by more detailed descriptions of actor and use
case
Add new
advert to
campaign
Campaign
Manager
51
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.
52
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
53
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
54
Add a new
member of staff
Record client
payment
55
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.
56
Accountant Use Case descriptions
Add a new staff grade
57
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.
58
Accountant Use Cases
59
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’
60
Detailed Description of a
Use Case
• add more detail
• … structured description
• … following a template
request
actor response system
62
In comparison: A more general Add new
Use Case description. Use cases advert to
campaign
get more detailed as analysis Campaign
progresses Manager
63
Additional descriptions for use
cases: 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
Description: Details of each advert are entered into the system, including advert cost
and cost relative to budget
Precondition: Advert is not already part of campaign
Normal Flow
1. Campaign manager indicates they want to add advert
2. System displays campaign budget, total cost of adverts paid for and total
estimated cost of adverts not paid for.
3. Campaign manager enters details of advert including estimated cost.
4. System checks campaign is within budget. If so, it creates new advert
and adds to list of adverts for that campaign
Postcondition: Advert is now part of campaign
Alternate Flow
Step 4. The advert will exceed the budget and a budget extension request is
generated. 65
Additional descriptions for use
cases: Exceptions
67
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)
68
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)
Difference between exceptions and alternative flows is subtle, you will not be required to
distinguish these in exams 69