Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Documenting Use Cases in Information Systems: Pre-conditions, Events, and Post-conditions, Lecture notes of Computers and Information technologies

An in-depth exploration of use cases in information systems engineering. It covers the importance of use case diagrams, the need for complete use cases, and the role of pre-conditions, flow of events, and post-conditions. The document also discusses handling complex use cases and guidelines for writing effective use case scenarios.

Typology: Lecture notes

2010/2011

Uploaded on 09/09/2011

rossi46
rossi46 🇬🇧

4.5

(10)

313 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
If ti S t
I
n
f
orma
ti
on
S
ys
t
ems
Engineering
Documenting use cases
The use case
A use case diagram showing
All use cases
All actors
Relationshi
p
between them
p
Is very useful for reasons we have already
discussed.
A use case on its own doesn’t tell us very
much…..
The complete use case
Each use case must include details
about what has to be done to carry out
the process.
We need to consider:
We
need
to
consider:
basic functionality
any alternatives
error conditions
what must be true before starting
what must be true when exiting
Standards
UML gives a format for a use case including a
complete range of attributes that the designer
might want to include.
This format has been adapted by many
desi
g
ners…..
g
Basic Use Case documentation should include:
preconditions
flow of events (basic and alternatives)
postcondition
Pre- and post-conditions
They indicate what comes before and after
the use case
Tell what state the system must be in at
start of use case (pre
condition)
start
of
use
case
(pre
-
condition)
Tell what state the system must be in at
the end of the use case (post-condition)
Post-condition must always be true
Pre- and post-condition
example
Deposit VAT Use case
Pre-condition: it is end of one our business
quarters
Flow of events:
1. The system determines the amount of VAT
payable for this quarter
2. The system send electronic VAT payment to
customs & excise
Post-condition: The government has
deposited our VAT and updated our records.
pf3
pf4
pf5

Partial preview of the text

Download Documenting Use Cases in Information Systems: Pre-conditions, Events, and Post-conditions and more Lecture notes Computers and Information technologies in PDF only on Docsity!

I fInformation Systems ti S t

Engineering

Documenting use cases

The use case

  • A use case diagram showing
    • All use cases
    • All actors
    • Relationship between themp

Is very useful for reasons we have already

discussed.

  • A use case on its own doesn’t tell us very

much…..

The complete use case

  • Each use case must include details

about what has to be done to carry out

the process.

  • We need to consider:We need to consider:
    • basic functionality
    • any alternatives
    • error conditions
    • what must be true before starting
    • what must be true when exiting

Standards

  • UML gives a format for a use case including a complete range of attributes that the designer might want to include.
  • This format has been adapted by many designers…..g
  • Basic Use Case documentation should include:
    • preconditions
    • flow of events (basic and alternatives)
    • postcondition

Pre- and post-conditions

  • They indicate what comes before and after

the use case

  • Tell what state the system must be in at

start of use case (pre condition)start of use case (pre-condition)

  • Tell what state the system must be in at

the end of the use case (post-condition)

  • Post-condition must always be true

Pre- and post-condition

example

Deposit VAT Use case

Pre-condition : it is end of one our business quarters Flow of events:

  1. The system determines the amount of VAT payable for this quarter
  2. The system send electronic VAT payment to customs & excise Post-condition: The government has deposited our VAT and updated our records.

Some points ...

  • The post-condition must always be true
  • If our system fails, we are still responsible

for getting the VAT payment to customs &

exciseexcise

  • Whatever errors happen post-condition

must be true

Flow of events

  • A series of declarative statements listing

the steps of a use case

  • Alternatives can be shown using

branching or by listing them underbranching or by listing them under

alternative paths.

Branching example

Part of Find prescription use case Flow of events:

  1. User may enter a presc id, pat id, or pat name
  2. User presses find. 3. If user entered a prescription id3. If user entered a prescription id a) the system will display that prescription. 4. If the user entered pat name or pat id a)system returns list of all prescriptions for that patient b)user selects one prescription from list c)system displays that prescription

Repetition example

Part of Enter drugs Use Case Flow of events:

  1. Use Case starts when Doctor selects enter drugs
  2. Doctor enters his id-no
  3. Doctor enters drug names to be prescribed 4. For each drug name entered a) the system will show drug-id, special notices b) the system will assign drug to patient end
  4. Doctor enters dosage and intervals
  5. Doctor enters submit

Alternative paths

  • Gives the alternatives to the basic path.
  • Can be used in place of branching, when

alternative is complex.

  • Good for showing things that can happenG d f h i thi th t h

at any time - something that interrupts

normal flow of events. E.g. user selects

cancel

Example - alternative path to

our previous use case enter

drugs

alternative paths

at any time before selecting submit, Doctorat any time before selecting submit, Doctor can select cancel. Drugs are not assigned to patient and the use case ends. In step 3, if drug brand is unavailable, system will prompt Doctor for an alternative

Some guidelines cont..

  • Scenarios are a communication tool - must

give appropriate information.

  • Who will read them?
  • You might need to add a special

requirements section to the use case

description e.g. System must always

respond to Doctor within one second.

What are we trying to document

exactly?

  • Remember, we are using the use case modelling technique at different levels of analysis and design: - Business analysis - Requirements analysis - Understanding the process - Confirming the interaction required with the system - Interface design - Suggesting different scenarios we could use

Mind your language….

  • The language we use to describe our scenarios must relate to the current level of analysis design
  • DDuring early requirements analysis we might just i l i t l i i ht j t want to document the process in a general way: Essential Use Case
  • Later on we might want to show the interaction as we perceive it to be: System Use Case

What are they?

  • Essential Use Case
    • often referred to as a business or abstract use case model
    • models a technology-independent view of the requirements.
  • SS ystem Use Caset U C
    • also known as concrete use case models or detailed use case models
    • describes in detail how users will work with your system including references to its user-interface aspects.

Language of an Essential Use

Case ( small part of a use case)

  • Describing a student enrolling for a course :
    1. A student wants to enrol in a course
    2. The student submits his name and student number to the registrar. 3 3. The registrar checks that the student isThe registrar checks that the student is eligible to enrol in courses at the university according to the university
    3. The student indicates, from the list of available courses, the course that he wants to enrol in.

Language of a System Use Case

(small part of a use case)

  • Describing a student enrolling for a course:
    1. A Student goes online to enrol for a course
      1. Student inputs his name and student number into the system 3.The system validates the students details and eligibility for enrolment. 4.The system displays the list of courses available to the student.
      2. The student selects the required course.

Secondary scenarios

  • To completely define a use case identify

alternate paths and scenarios for error

conditions

  • Go though primary scenario and ask

questions:

  • is there some other action that can be taken at this point?
  • Is there something that could go wrong at this point?
  • Is there some behaviour that could happen at any time?

Secondary scenarios cont...

  • Each secondary scenario needs a name

and/or brief description

  • to document them
    • add alternatives and exceptions to the primarydd lt ti d ti t th i use case (o.k if not too complex) OR
    • write a complete scenario for each alternate path identified (clearer in complex systems)

What should we end up with?

  • A list of actors (and descriptions)
  • A list of use cases (and descriptions)
  • A Use Case model (diagram)
  • For each use case
    • A primary scenario properly documented
    • A number of secondary scenarios
      • These may be incorporated into the primary scenario
      • May write a complete scenario for each of these alternative paths

Documenting a use case

  • An example:
    • See the example on Teachmat for admit a patientpatient