Airline System

You might also like

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 DJ306 DJ312 DJ318 DJ324 DJ336 DJ342 6:10am 8:50am 11:35am 2:20pm 5:10pm 7:50pm

Arrives 8:25am 11:05am 1:50pm 4:35pm 7:25pm 10:05pm

Aircraft B767 A300 B767 B777 B767 B777

MON X X X X X

TUE X X X X X

WED X X X X X X

THU X X X X X X

FRI X X X X X X

SAT

SUN

X 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

Prepare Flight Plan To organise the long term plan to meet expected demand and to make actual flights available for reservations. Flight scheduler Actors 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 USE CASE 1 Goal in context 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

Responsibilities Notes Exceptions Pre-conditions Post-conditions

addPlannedFlight ( flightCode : String, departTime : Time, arriveTime : Time, departLocation : String arriveLocation : String, aircraftType : String ) To add a planned Flight.

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

Responsibilities Notes Exceptions Pre-conditions Post-conditions

addDayToPlannedFlight ( aPlannedFlight : PlannedFlight dayOfWeek : DayOfWeek ) To add a day to a planned flight

A Planned Flight has been previously identified. The PlannedFlight object linked to the DayOfWeek object.

Communication Diagram

CONTRACT Responsibilities Notes Exceptions Pre-conditions Post-conditions

prepareActualFlights( monthStartDate : Date) To create the actual flights ready for the flight reservations from customers.

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.

Make Flight Reservation USE CASE 2 To make a reservation for a flight. Goal in context Customer, Reservation officer Actors 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 The customer information is recorded each time a customer makes a Notes 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