CPSC333 SENG 311: Foundations Principles of SE - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

CPSC333 SENG 311: Foundations Principles of SE

Description:

The system should allow to book single or double rooms at the resort hotel ' ... Canceling of course or room bookings are only possible up to 10 days ahead. ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 24
Provided by: rosejoshua
Category:

less

Transcript and Presenter's Notes

Title: CPSC333 SENG 311: Foundations Principles of SE


1
CPSC333 / SENG 311 Foundations / Principles of SE
  • Use Case Diagram Examples

2
Example Ski resort information system
  • Users should be able to query weather and snow
    condition forecasts for a date they enter.
  • The system should allow to book single or double
    rooms at the resort hotel Skiers Luck online
    (with credit card).
  • Visitors should be able to book one-day beginners
    courses on snowboards.
  • There is only one course a day.
  • The max. size of a course is 8 persons.
  • The resort offers special courses for kids. In
    order to built courses with kids of same age, the
    customer has to enter the kids age.
  • Canceling of course or room bookings are only
    possible up to 10 days ahead.

3
(No Transcript)
4
Errors you should prevent (1)!
includes stereotype in actor associations
5
Errors you should prevent (2)!
  • Associations between actors
  • Unnamed associations between use cases

6
Errors you should prevent (3)!
  • System not use case!
  • Name relations!

7
Errors you should prevent (4)!
Wrong understanding of the extends stereotype
8
Errors you should prevent (5)!
  • Diagram moves main functionality outside the
    system

9
Errors you should prevent (6)!
  • Data structures instead of functions as use
    cases, e.g. date, age, database
  • relations not named

10
Example Use Case Diagram
Query weathersnow forecast
includes
Book room
Enter personal info
Book SB course
includes
Extension points Enter participants age
extends
Cancel course
Book kids SB course
Cancel room
11
Use Case (1)
  • Use Case Query weather snow forecast
  • Actor(s) Visitor
  • Precondition -
  • Main flow
  • Visitor enters date
  • Weather snow forecast for local region is
    displayed for specified date
  • Postcondition The system is unchanged.

12
Use Case (2)
  • Use Case Book SB course
  • Actor(s) Visitor
  • Precondition -
  • Main flow
  • Visitor enters date
  • Include (Enter personal info)
  • (Enter participants age)
  • Store reservation
  • Confirm reservation to Visitor
  • Exceptional flow
  • If number of course participants for specified
    date gt 8, then tell Visitor so and let him/her
    choose another date
  • Postcondition Course is booked for specified date

13
Use Case (3)
  • Use Case Book kids SB course
  • Precondition Extends Book SB course at (Enter
    participants age)
  • Main flow
  • Enter childs age
  • Exceptional flow
  • If course for specified date is adult course,
    then tell visitor so and let him/her choose
    another date.
  • Exceptional flow
  • If course for specified date is kids course, and
    the specified age is outside the courses age
    range, then tell visitor so and let him/her
    choose another date.
  • Postcondition The age of the participant is
    valid for the course. Book SB course is
    rejoined.

14
Example literature reference management system
  • Storage and retrieval of references, e.g.

Title The Unified Modeling Language User
Guide Authors G. Booch, J. Rumbaugh, I
Jacobson Publisher Addison-Wesley Publication
year 1998
  • Small exercise
  • Draw a Use Case Diagram (at least two use cases)
  • Describe use cases (at least one)

Title Software Engineering in the Internet
Age Authors F. Maurer, G. Kaiser Publisher
IEEE Publication year 1998 Journal IEEE
Internet Computing Magazine Volume 2 Issue 5
15
Use Case Diagram literature reference management
Literature Reference Mgmt.
Add reference
Remove reference
User
Search for reference
List references
16
Event flow List references
  • Precondition user has selected list references
    functionality.
  • The system prompts the user to select the device
    printer or file.
  • The system prompts the user to select the print
    order by name or by title.
  • Postcondition The use case finishes with the
    system printing the list on the requested device.

17
Event flow Add reference
  • Precondition The user has selected add new
    reference functionality.
  • The system prompts the user to select if he/she
    wants to add a normal reference or a book.
  • The system prompts the user to enter title,
    author, and publisher of the reference
  • (Add journal paper)
  • Postcondition The user is notified that the
    reference has been successfully added.
  • Except-1 The reference already exists. The user
    can re-enter the data or terminate the use case.

18
Use case Add journal paper
  • Add journal paper If the paper is a journal,
    then the system additionally asks for the
    journals name, the volume number and the issue
    number.

Add journal paper
Add reference
ltltextendgtgt
19
Exercises
  • Develop use case diagram and textual use case
    descriptions for
  • an elevator (1 elevator, n floors)
  • a telephone (with number memory)
  • an e-mail system

20
Elevator -- Use Case
1 elevator, n floors
Elevator
press an elevator button
press a floor button
enter and exit through a door
User
21
Small TestBank account manager
  • System has to run on an automated teller machine.
  • User must be able to deposit checks into the
    account.
  • User must be able to draw money from the account.
  • User should be able to query the balance of
    his/her account.
  • The user should get a receipt for a transaction
    on request. The transaction type (withdrawal or
    deposit), the transaction date, the account
    number, the amount, and the new balance should be
    visible on the receipt.
  • After each transaction the new balance should be
    displayed to the user.

22
Example bank account manager
  • Use case for withdrawal
  • Use case for depositing
  • Use case for balance query
  • Small Test
  • Draw a Use Case Diagram (Organize use cases)
  • Describe use cases

23
Were Available!
  • Questions?
  • if you have any questions about contents of this
    lecture or other course-related issues, please
    come by during our office hours, or send us email
  • Dr. Joshua MTW, 12-1pm, ICT 548
  • joshuar_at_cpsc.ucalgary.ca
  • Dr. Walker WF, 1-2pm, ICT 546
  • rwalker_at_cpsc.ucalgary.ca
Write a Comment
User Comments (0)
About PowerShow.com