0% found this document useful (0 votes)
3 views

Add Reqs Analysis

Uploaded by

3elwa Mhd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Add Reqs Analysis

Uploaded by

3elwa Mhd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Additional problems on

requirements analysis
(with solutions)
Dr. Constantinos Constantinides, P.Eng.
Department of Computer Science and Software
Engineering
Concordia University

1
PROBLEM 1: Library system

2
Description of the system

• Consider a software that manages a library. The library maintains a catalog of


books.
• Users access a terminal in order to search for books and possibly make a loan. Only
one user can access a terminal at a time, and a loan may include no more than 3
items.
• Each loan is recorded in the system with its corresponding date, time and the id of
the user.
• A record for a book contains a title, an ISBN and a serial number. The library may
contain possibly several copies of the same book, and only serial numbers are
unique to each copy.
• The library management software system must maintain a record of how many
physical copies there are for each book.

• Task 1.1: Given the above description, create a UML domain model.

3
Problem 1.1: Solution

Loan 1..3
LoanLineItem
date: Date
time: Time
userid: UserIdType
1
1
1
BookSpecification Book
1 1..*
title: String
serialNumber: Integer
captures isbn: ISBNType
editor: String
\quantity
Derivable from the number
1 of instances of Book
associated with
Terminal Catalog BookSpecification.
1

accesses
LibraryUser 4
1
Use case Make Loan

• Use Case Make Loan:


• A library clerk indicates to the system that they need to initiate a new loan. They
will then proceed to add each loan item by scanning its serial number. For each
loan item, the system responds with a confirmation. Upon having scanned all
items, the clerk indicates to the system that they need to conclude the
transaction.

• Task 1.2:
1. Create a system sequence diagram (SSD) to capture the use case Make
Loan.
2. Identify system operations from the SSD above.

5
Problem 1.2.1: Solution

:System
:Clerk

makeNewLoan()

i = 1..3 addLoanItem(serial-number)

confirmation

endLoan()

6
Problem 1.2.2: Solution

:Clerk :System

makeNewLoan()

System operations:
i = 1..3 addLoanItem(serial-number) makeNewLoan()
confirmation addLoanItem(serial-number)
endLoan()
endLoan()

7
PROBLEM 2: Airline management

8
Description of the system

• Consider a system to manage the issuing of tickets for airlines. In this system we
are given the following types: Integer, Real, Boolean, Date, Time, and String.
• A flight is associated with several attributes such as date, departure- and arrival-
time, duration and finally with capacity that captures the maximum number of
passengers it can accommodate.
• Possibly several flights originate from, or arrive at an airport. Each airport has a
unique name.
• An airline handles possibly several flights and a flight can only be handled by a
single airline. Each airline maintains a single catalog that holds all tickets that the
company issues.
• Passengers may book tickets with several flights. A passenger is associated with a
number of attributes such as their name, age and a unique id. A ticket is unique for
each passenger-flight pair. In addition, a ticket may be discounted. Every passenger
is accompanied by at most one other passenger (for example an underage
passenger will be accompanied by an adult). Finally, the system maintains a
hierarchy of passengers by distinguishing between regular and VIP ones.

• Task 2.1: Given the above description, create a UML domain model.

9
Problem 2.1: Solution

1 *
Airport Flight
origin
name: String 1 date: Date
*
departure: Time *
destination arrival: Time
handles
duration: Integer
capacity: Integer

accompanied-by
1
Passenger
name: String
age: Integer
* id: String 0, 1

1
1 1
Ticket Catalog Airline

VIPPassenger discounted: Boolean


10
PROBLEM 3: Rentals

11
Rentals: Domain model

RentalItemSpecification
Item
description 1 *
Catalog
artist serial-number
title
year
line item 1..4

Rental Customer
Registry 0, 1 1 CustomerDb
date: Date name
time: Time age
id

LoyaltyPrgmCustomer

12
PROBLEM 4: Course management

13
Course management: Domain model
abstract class

Student * * Course
Admitted
name name
student-id number
section
course-id

Graduat Undergraduat
e e

Registration
Calendar
term

Offerings

Console 14
Course management:
SSD for use case Process Registration
:Actor :System

initiateRegistration(student_id)

acknowledgment, student

loop
getCourse(course_id)

course

makeRegistration(student, course)

acknowledgment

endRegistration(student_id)

acknowledgment
15
Course management: System operations
for use case Process Registration
:Actor :System

initiateRegistration(student_id)

student

loop
getCourse(course_id)
System operations:

course initiateRegistration(student_id)
getCourse(course_id)
makeRegistration(student, course) makeRegistration(student, course)
endRegistration(student_id)
acknowledgment

endRegistration(student_id)

acknowledgment
16
Course management: Operation contract for
makeRegistration(..)

Operation contract: makeRegistration(student, course)

Precondition: Student exists.


Course Exists.

Postcondition: A Registration object, reg, has been created. (object creation)


reg has been associated with student and course objects. (formation of association)
An instance in Offerings has been modified (to accommodate reg). (attribute modification)

17

You might also like