You are on page 1of 3

TUNIS BUSINESS SCHOOL

UNIVERSITY OF TUNIS

Requirements Analysis Exercises


Use case diagram

Exercise1
Train Distributor

A train traveler uses a train distributor to purchase tickets. The train distributor is connected to
a central computer system which maintains a reference database for the tariff to keep it
updated.

A traveler can buy several types of tickets: one or two way tickets and weekly or monthly
cards. Before completion of his transaction, the traveler is able to abort it (i.e., the traveler
selects the cancel button without completing the transaction). The transaction can also be
nullified by the distributor if the traveler takes too long to insert the right amount (time-out).

Also when purchasing the ticket, some other exceptions might arise such as the distributor
being out of charge or out of paper.

1) Based on this description, identify the different actors and uses cases.

2) Draw the use case diagram of this train distributor.

Exercise 2
Online bookstore system

We want to model the functionalities offered by an “online bookstore system”

The online bookstore offers to the web customer the opportunity to make online purchases.
Indeed, the web customer can browse a wide range of books arranged in several categories
before sign up. Once the web customer signs up, he/she can search for a specific books’
category (novel, technology, historical and children books). Before purchasing a book, the
web customer must add it to the shopping cart and can view its price. The web customer can
purchase several books. The book is considered as purchased only if the web customer
proceeds to payment. The payment can be done either by using credit or debit card. The
payment requires a connection to the banking system. After a few days delivery will be made.

Each web customer can also be a producer of the website. He can publish an article in a
particular field. The publication of an article under goes the following steps:

CS120 1
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

The producer writes his document and submits it via the website. At the reception, an operator
sends the article to an expert to validate or not its publication or possibly to suggest to make
some corrections.

If the article is accepted to be published, it should be indexed by the operator. Before indexing
the article, the operator must add it to the producer‘s account and updates the database.

At any time, the producer can view the state of his article.

The website must also allow web customers to express their opinion in the form of remarks or
criticism on the readings proposed by the website.

Draw a use case diagram describing the requirements of the bookstore system.

Exercise 3
Airline Reservation System

In an airline company, a ticket clerk ensures the check in of Passengers by weighing the
luggage and assigning a seat to each one.

Sometimes, passengers express a preference for one of seat Types (some window and some
aisle seats). But of course, they cannot just be given their preference right away, because the
seat they want might not be available.

Therefore, the process of assigning a window seat involves checking for the availability of
window seats, whereas, the process of assigning an aisle seat involves checking for the
availability of aisle seats.

The Ticket clerk is also responsible for adding and cancelling reservation.

In order to add a reservation to the system, the available space must be checked and the
passenger’s information must be recorded. But to cancel a reservation, he must only update
seating chart.

Exercise 4
Library System
We want to model the functionalities offered by a « Library System ». The library employs
two types of workers: librarians and head librarians (who are librarians with special
privileges). One of the librarian’s tasks is to update the database of the library assets. This
update occurs when a librarian either adds a new asset (which can be a book, a video or a CD)
or deletes an old one from it.

Only the Head Librarian has the ability to purchase new books and run audits on the system.

CS120 2
TUNIS BUSINESS SCHOOL
UNIVERSITY OF TUNIS

A patron (the person who is borrowing the asset) can check the availability of an asset within
the library system. He can alsofind the date at which an unavailable asset will become
available again. Then, he will supply his library card to the librarian who will scan it to access
to the patron’s account information. The librarian will consequently perform the transaction in
behalf of the patron: checking assets in and/or out.

In order to check out (borrow) an asset, the librarian will check the patron’s account
information to verifyif one of the already borrowed assets is overdue. In case of an overdue
fine, he processes its payment before allowing another asset to be checked out. Next, heads
the asset being checked out to the patron’s account information and updates the database of
assets accordingly.

To check in (return) an asset, the librarian removes it from the patron’s account information
and updates the database of assets. If the patron owes an overdue fine, the system notifies the
librarian and permits the receipt of the overdue fine payment.

Draw a use case diagram describing the requirements of the library system.

Exercise 5
A gardener carries out two types of work: watering and digging. Watering involves watering
plants with a tool (watering can or pipe), while digging involves turning over the soil with a
tool (pickaxe or shovel) to apply fertilizer.

Draw a use case diagram.

CS120 3

You might also like