Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

2.3 Examples Ski resort information system by ngs20854

VIEWS: 183 PAGES: 21

									2.3 Examples:
    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 “Skier’s 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 kid’s age.
     Canceling of course or room bookings are only possible up to 10 days
     ahead.




 CPSC 333: Foundations of Software Engineering                     J. Denzinger
CPSC 333: Foundations of Software Engineering   J. Denzinger
Errors you should prevent (1)!




 << includes >>
 stereotype in actor
 associations




 CPSC 333: Foundations of Software Engineering   J. Denzinger
Errors you should prevent (2)!

• Associations
between actors

• Unnamed
associations
between use
cases




 CPSC 333: Foundations of Software Engineering   J. Denzinger
Errors you should prevent (3)!


• System
no use
case!

•Name
relations!




 CPSC 333: Foundations of Software Engineering   J. Denzinger
    Errors you should prevent (4)!




Wrong
understanding
of the
<<extends>>
stereotype


      CPSC 333: Foundations of Software Engineering   J. Denzinger
Errors you should prevent (5)!

Diagram moves main
functionality outside the
system




 CPSC 333: Foundations of Software Engineering   J. Denzinger
Errors you should prevent (6)!


• Data structures
instead of
functions as use
cases, e.g. date,
age, database

• relations not
named



 CPSC 333: Foundations of Software Engineering   J. Denzinger
Example Use Case Diagram
                                      Query
                                   weather&snow
                                     forecast
                                                  <<include>>
                                   Book room
                                                                    Enter
                                                                 personal info
 Visitor                            Book SB        <<include>>
                                     course

                                                     <<extend>>
                                   Cance           (Enter kid’s age)
                                     l
                                   cours                        Book kids’
                                     e                          SB course
                                   Cancel
                                    room
CPSC 333: Foundations of Software Engineering                          J. Denzinger
Use Case (1)

 Use Case: Query weather&snow forecast
 Precond: -
 Main flow:
    1. Visitor enters date
    2. Weather & snow forecast for local region is
       displayed for specified date




 CPSC 333: Foundations of Software Engineering   J. Denzinger
Use Case (2)
 Use Case: Book SB course
 Precond: -
 Main flow:
      1.    Visitor enters date
      2.    Include (Enter personal info)
      3.    (Enter kid’s age)
      4.    Store reservation
      5.    Confirm reservation to Visitor
 Exceptional flow:
      If number of course participants for specified date > 8, then tell
           visitor so and let him choose another date



 CPSC 333: Foundations of Software Engineering                    J. Denzinger
Use Case (3)
 Use Case: Book kids’ SB course
 Precond: SB course is for a kid
 Main flow:
      1.    Enter kid’s age
      2.    Store reservation
      3.    Confirm reservation to Visitor
 Exceptional flow:
      If course for specified date is adult course, then tell visitor so and
            let him choose another date.
 Exceptional flow:
      If course for specified date is kids’ course, and the specified age is
            outside the course’s age range,
            then tell visitor so and let him choose another date.

 CPSC 333: Foundations of Software Engineering                      J. Denzinger
Example: literature reference
management system

     Storage and retrieval of references, e.g.

 Title: The unified modeling language user guide   Small exercise:
 Authors: G. Booch, J. Rumbaugh, I Jacobson
 Publisher: Addison Wesley                         Draw a Use Case
 Publication year: 1998                            Diagram (at least
                                                   two use cases)
 Title: Software engineering in the Internet age
 Authors: F. Maurer, G. Kaiser                     Describe use
 Publisher: IEEE                                   cases (at least
 Publication year: 1998
                                                   one)
 Journal: IEEE Internet Computing Magazine
 Volume: 2
 Issue: 5

 CPSC 333: Foundations of Software Engineering             J. Denzinger
Use Case Diagram: literature
reference management
                                                    Add
                                                  referenc
                                                      e

                                                    Remove
                                                   reference

               User
                                                 Search for
                                                 reference


                                                     List
                                                 references



 CPSC 333: Foundations of Software Engineering                 J. Denzinger
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.
     The use case finishes with the system printing the list
     on the requested device.




 CPSC 333: Foundations of Software Engineering    J. Denzinger
Event flow: Add reference
     Precondition: 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)
     (Except-1).
     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.



 CPSC 333: Foundations of Software Engineering           J. Denzinger
Use case: Add journal paper



                                    <<extend>>
                                                 Add journal
              Add reference
                                                   paper


 Add journal paper: If the paper is a journal, then the
   system additionally asks for the journal’s name, the
   volume number and the issue number.




 CPSC 333: Foundations of Software Engineering                 J. Denzinger
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




 CPSC 333: Foundations of Software Engineering   J. Denzinger
Elevator -- Use Case
      1 elevator,
       n floors                                  Elevator

                                      press an elevator button


                                        press a floor button

     User
                               enter and exit through a door



 CPSC 333: Foundations of Software Engineering                   J. Denzinger
Small Test:
Bank 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.




CPSC 333: Foundations of Software Engineering             J. Denzinger
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



 CPSC 333: Foundations of Software Engineering                    J. Denzinger

								
To top