Sie sind auf Seite 1von 2

Birla Institute of Technology & Science, Pilani

Work-Integrated Learning Programmes Division


First Semester 2013-2014
Comprehensive Examination
(EC-3 Regular)
Course No.
Course Title
Nature of Exam
Weightage
Duration
Date of Exam
Note:

: SS ZG514
: OBJECT ORIENTED ANALYSIS & DESIGN
: Open Book
: 50%
: 3 Hours
: 10/11/2013 (FN)

No. of Pages

=2

No. of Questions = 5

1. Please follow all the Instructions to Candidates given on the cover page of the answer book.
2. All parts of a question should be answered consecutively. Each answer should start from a fresh page.
3. Assumptions made if any, should be stated clearly at the beginning of your answer.
Q.1. A system is used by an airline company to provide reservation services to its customers (frequent
flyer account holders). The requirements and analysis activities of the system are illustrated by
the following artifacts:
UC1: Reserve Flight (main/success scenario): A customer accesses an on-line console maintained
by an airline carrier in order to make a booking of one or possibly more flights. The system
maintains a catalog of all flights supported by the carrier and presents this catalog to the customer.
For each flight booking request, the system must display a confirmation. The customer must
complete the session initiating the console to capture (save) all flights booked in a transaction
record.
Preconditions:
1. Customer has been authenticated from a database (customer catalog).
Postconditions:
1. One(or more) bookings have been made on a given customer.
2. Frequent flyer miles information of customer has been updated.

(a)

Identify the domain classes and give the domain model for the airline company.

[10]

(b)

Create a system sequence diagram (SSD) with respect to the first scenario
Reserve Flight
[5]
(c)
Create a set of operation contracts for the SSD of Reserve Flight. Clearly
illustrate the relationships between the operation contract and the domain model.
[5]
AddFlight()
by Controller

(d)

Using the Make Reservation operation contract as a starting hint, complete the
UML collaboration diagram. Annotate every message with the hint GRASP (Expert,
Creator, and so on) and/or other pattern that justifies it. If you add responsibilities not
explicit in the contract (because you think they are important to fulfill), please briefly
explain these additions.
[10]

SS ZG514 (EC-3 Regular)

First Semester 2013-2014

Page 1 of 2

SS ZG514 (EC-3 Make-up)

Second Semester 2012-2013

Page 2

Q.2. Quality Building Supply has two kinds of customers: contractors and the general public. Sales to
each are slightly different.
When a contractor buys materials, he/she takes them to the contractor checkout desk. The clerk
enters the contractor name into the system. The system displays the contractor information,
including his/her current credit standing.
The clerk then opens up a new ticket (sale) for the contractor. Next, the clerk scans in each item to
be purchased. The system finds the price of the item and adds the item to the ticket. At the end of
the purchase, the clerk indicates the end of the sale. The system compares the total amount against
the contractors current credit limit, and if it is acceptable, finalizes the sale. The system creates an
electronic ticket for the items, and the contractors credit limit is reduced by the amount of the
sale. Some contractors like to keep a record of their purchases, so they request that the ticket
details be printed out. Others arent interested in a printout.
A sale to the general public is simply entered into the cash register, and a paper
ticket is
printed as the items are identified. Payment can be by cash, check, or credit card. The clerk must
enter the type of payment to ensure that the cash register balances at the end of the shift. For credit
card payments, the system prints out a credit card voucher that the customer must sign.
Draw an activity diagram that represents the contractor buying the material.

[5]

Q.3. The alarm clock consists of three buttons:


ALARM: for setting the alarm time
SNOOZE: for postponing the ringing of the alarm.
ON/OFF: for enabling and disabling the alarm.
Initially, the alarm is disabled. Whenever the current time is the same as the alarm time and the
alarm is enabled, the alarm starts ringing. If the alarm is ringing and the SNOOZE button is
pressed, the ringing is postponed for 10 minutes. The alarm time can be set at any time using the
ALARM button. Only when the alarm is enabled it can be disabled using the ON/OFF button.
Draw a UML state diagram of a simple alarm clock as per the above specification.

[5]

Q.4. Assume that you are implementing a file system. The main concepts in a file system are
directories and files. A directory may contain several files and directories. Additionally, you
would like to treat files and directories in a uniform way as nodes, i.e., you would like to be able
to write code that can treat both files and directories using the same interface. What design
pattern could you use to achieve these goals? Design a class structure which can represent a file
system.
[5]

Q.5. Consider a weather-reporting application with a class, WeatherReporter, that stores the latest
weather report. On screen are two representations of the weather report TextReport and
GraphicReport each handled by its own class. The TextReport class describes the weather in text,
such as:
Temperature: 29C, Probability of Precipitation: 20%
A separate GraphicReport class represents the weather with icons (a thermometer icon for
temperature and a pie chart for the probability of precipitation).
When the weather application starts, instances of TextReport and GraphicReport register to
receive updates from the WeatherReporter object. The instances TextReport and GraphicReport
act accordingly whenever the weather data changes. Each object is responsible for independently
handling the update in its own way.
New classes can be added to the application at any time to handle the weather data in other ways.
For example, a SoundReport class could play the sound of rain when it's raining, and an
EmailReport class could use a server-side script to send out email when the weather report is
updated. What design principle is applicable? Design a class structure which can represent a
weather-reporting application.
[5]
____________

SS ZG514 (EC-3 Regular)

First Semester 2013-2014

Page 2 of 2

Das könnte Ihnen auch gefallen