Add Reqs Analysis
Add Reqs Analysis
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
• 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
• 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
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(..)
17