Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

CASE STUDY: AIRLINE RESERVATION

The case study records information about scheduled and planned flights for an airline and the flight
reservations made by customers. The key elements in the system revolve around Planned and Actual
Flights, and the reservations made by customers of actual flights.

A Planned Flight represents a forward schedule of the expected flight pattern for a flight. This is best
illustrated by an example. The flights by Virgin Blue airline between Brisbane and Melbourne have
the plan shown below. Each row represents a Planned Flight, for example, flight DJ306 operates at the
same time Mon to Sat.

Brisbane-Melbourne
Flight Departs Arrives Air- MON TUE WED THU FRI SAT SUN
craft
DJ306 6:10am 8:25am B767 X X X X X
DJ312 8:50am 11:05am A300 X X X X
DJ318 11:35am 1:50pm B767 X X X X X X X
DJ324 2:20pm 4:35pm B777 X X X X X X X
DJ336 5:10pm 7:25pm B767 X X X X X X
DJ342 7:50pm 10:05pm B777 X X X X X X

Aircraft – these are the type of aircraft, A300 – Airbus; B767 & B777 Boeing.

An Actual Flight represents the flight of an aircraft on a day, according to the scheduled flight. For
example, DJ306, Brisbane – Melbourne, on Tuesday, 25 September, departing 6:10 am is an actual
flight.

Analysis class diagram


USE CASE 1 Prepare Flight Plan
Goal in context To organise the long term plan to meet expected demand and to make actual
flights available for reservations.
Actors Flight scheduler
Main course description
Step Action
1 At the start of each month the Flight scheduler reviews the flights planned for
6 months from now.
2 The scheduler adds new planned flights.
3 The scheduler adds a new day to an existing planned flight.
4 When the scheduler is satisfied with the plan, they prepare the actual flights
for the month according to the plan.
Alternate course description
Step Branching Action
3a The scheduler can add actual flights that are in addition to the planned flights.
Notes

System events are:

1. addPlannedFlight (flightCode, departTime, arriveTime, departLocation, arriveLocation,


aircraftType).
2. addDayToPlannedFlight ( aPlannedFlight, dayOfWeek);
3. prepareActualFlights ( monthStartDate )
4. addActualFlight (flightCode, flightDate, flightStartTime, flightEndTime, startLocation,
endLocation, aircraftType).
CONTRACT addPlannedFlight (
flightCode : String,
departTime : Time,
arriveTime : Time,
departLocation : String
arriveLocation : String,
aircraftType : String )
Responsibilities To add a planned Flight.
Notes
Exceptions
Pre-conditions
Post-conditions PlannedFlight object created.
Attributes flightCode, departTime, arriveTime, departLocation,
arriveLocation, aircraftType set to corresponding parameters.
The PlannedFlight object linked to the Airline object.

Communication Diagram
CONTRACT addDayToPlannedFlight (
aPlannedFlight : PlannedFlight
dayOfWeek : DayOfWeek )
Responsibilities To add a day to a planned flight
Notes
Exceptions
Pre-conditions A Planned Flight has been previously identified.
Post-conditions The PlannedFlight object linked to the DayOfWeek object.

Communication Diagram

CONTRACT prepareActualFlights(
monthStartDate : Date)
Responsibilities To create the actual flights ready for the flight reservations from customers.
Notes
Exceptions
Pre-conditions
Post-conditions For each PlannedFlight object
Calculate the days in the month that the flight will be flying
For each of the flying days,
Set the ActualFlight.flightDate to the day.
Set the attributes flightCode, departTime, arriveTime, departLocation,
arriveLocation, and aircraftType to the values from the PlannedFlight
object
Link each ActualFlight object to the Airline object.
USE CASE 2 Make Flight Reservation
Goal in context To make a reservation for a flight.
Actors Customer, Reservation officer
Main course description
Step Action
1 The use case begins when a customer contacts the airline to make a
reservation.
2 The reservation officer asks for customers flight information, ie departure and
arrival location and departure day and the number of people flying. The
reservation officer looks up the available flights on that day and informs the
customer of flight availability.
3 The customer selects one of the flights and makes a reservation, providing the
names of the passengers that are making the trip.
Alternate course description
Step Branching Action
1a
Notes The customer information is recorded each time a customer makes a
reservation. The airline does not reuse information about a customer made
from prior bookings.

System events are:

1. locateFlights ( departureLocation, arriveLocation, departureDate )


2. makeReservation ( theActualFlight, customerName, customerAddress, customerPhoneNumber )
3. makePassengerReservation ( passengerName )
Communication diagram

Communication Diagram
Question 1

Write contracts for the following system events:

addActualFlight (flightCode, flightDate, departTime, arriveTime, departLocation,


arriveLocation, aircraftType)

makeReservation ( theActualFlight, customerName, customerAddress, customerPhoneNumber )

Question 2

List the visibilities (local, attribute, or parameter) for each message in the following Communication
diagrams:

addPlannedFlight (messages 1 to 3)
makeReservation (messages 1 to 6)

List the message number, the message name, and the visibility type.

Question 3

Draw a design class diagram, considering only the Communication diagrams shown in the case study.

You might also like