You are on page 1of 21

An Object-oriented Analysis Model for Flight

Reservations: A case study in composition of patterns
Eduardo B. Fernandez and Zhen Jiang
Department of Computer Science and Engineering
Florida Atlantic Universit
Boca !aton" F# $$%$&
'ed ( z)iang*+cse.fau.edu
Abstract
Airport control soft,are is a ver comple- real.life sstem and the flight
reservation sstem is one of its most commonl used sections. /e descri0e
here an analsis model for such a reservation sstem" developed 0
composing different functional aspects. 1his model represents a minimum
application to 0oo2 a series of tic2ets and it can 0e applied to a variet of
similar situations. Each part of this model is ,hat ,e have called a Semantic
Analsis 3attern 4SA35" a pattern that realizes a fe, 0asic use cases. /e use
the airport e-ample to sho, that SA3s can 0e com0ined to 0uild comple-
applications in a convenient ,a that results in models that are fle-i0le and
reusa0le..
Keywords6 Analysis patterns, Flight reservation systems, Object-oriented analysis
and design, Flight routing.
&. 7ntroduction
/hen dealing ,ith the specification" design" or implementation of a num0er of
similar applications" common parts can 0e found. 1hese parts can 0e specified as
patterns that are independent from a particular specification" implementation details"
or implementation language. Sometimes such modules are not so simple6 a general
module for different purposes to achieve separation of concerns is not trivial.
8oreover" the more complicated modules often var slightl from application to
application. As the num0er of applications increases" their management 0ecomes
increasingl difficult and un,ield. 1he concept of Semantic Analysis Patterns
4SA3s5 9$: emphasizes functional aspects of the application model as opposed to
&
improving fle-i0ilit. 1he main purpose of this tpe of pattern is to serve as a starting
point ,hen translating re;uirements into a conceptual model. 1his tpe of pattern
represents a minimum application 4a set of 0asic use cases5 so that it can 0e applied to
a variet of situations and it can 0e com0ined ,ith other related patterns to descri0e
more comple- applications 9%:.
Soft,are for airport management is a ver comple- real.life sstem and the flight
reservation sstem is one of its most commonl used parts. 1picall a customer
places an order for a seat4s5 for a certain com0ination of connected flights. 1o support
such an operation" the customer and the sstem need to chec2 the feasi0ilit of flight
connections and their schedule. Several different atomic patterns can 0e derived to
provide the different functional aspects of the sstem. 1he purpose of this paper is
ting together these e-isting patterns to design a more comple- sstem" ,hich ,ould
0e ver hard to 0uild directl. Because of the ,a it is 0uilt the resulting model is also
fle-i0le and reusa0le.
Section < descri0es the re;uirement for this sstem and a set of atomic patterns.
Each atomic pattern focuses on a detailed functional aspect of the sstem. 1o descri0e
each pattern ,e follo, loosel the templates of 9<:. Section $ sho,s ho, ,e
compose these patterns to develop a flight reservation sstem. 1he effectiveness and
fle-i0ilit of this SA3 is sho,n 0 domain analsis using some e-amples. /e end
,ith some conclusions in Section %.
<. !e;uirements and atomic patterns
<.& !e;uirements
7t is possi0le to visualize the structure of a large sstem as a set of component
units 0ased on different functional aspects. 1he list of re;uirements for the reservation
sstem is given 0elo,. 1hese re;uirements correspond to some use cases ,hich ,e
do not descri0e in detail for conciseness.
• Customers ma2e reservations for specific seats in specific flights.
• A flight is defined 0 a num0er and a date" and determines a route from an
origin airport to a destination airport. 3lanes are assigned to flights.
• A route is the ,a follo,ed 0 a flight from its origin airport to its destination
airport. A route ma have several flights that share the same origin and
destination airports.
<
• A span is the ,a to get from a start airport to a termination airport using one
flight. 1he start 4or termination5 airport is called origin 4or destination5 airport
of this span.
• For each flight there are several connecting flights 4different flights that leave
from an intermediate stop closel after its arrival5.
• A tic2et includes a one.tic2et route 4one.,a tic2et5 or a t,o.tic2et route
4round.trip tic2et5. B a round.trip tic2et" a passenger can go to an airport and
come 0ac2 using the same route. A passenger ma use a different route to
come 0ac2 from the destination to ,hich she arrived. For each route" she
needs a set of one.,a tic2et4s5. Such a round.trip is a special case of one.
,a trip ,here its source and destination are the same. Stops are not indicated
in the tic2et unless the flight num0er changes" ,hich indicates a plane change.
• For the convenience of customers ,e 2eep information on relevant facilities=
for origins ,e 2eep aspects such as par2ing" for destinations ,e 2eep hotels
near the airport" for intermediate stops hotels in the airport" restaurants" etc.
1his information also includes details of the cities near0.
From these re;uirements" ,e derive some atomic patterns that descri0e aspects
such as >rder" Collection" Assignment" Connection" !outing" and !ole. 8ost of these
patterns here appeared 0efore" onl Connection and !outing appear to 0e ne,
patterns. For each functional aspect" ,e adopt a related pattern to implement it and
ma2e some ad)ustments to satisf the re;uirement of composition.
<.< 1ravel tic2et pattern
onte!t
A series of tic2ets for a certain tpe of trip 4one.,a ? round.trip5 is 0oo2ed for a
passenger.
"roblem
@o, to descri0e a re;uest for a series of tic2etsA
Forces
• 1he re;uest must 0e captured in a precise ,a.
• 3assengers ,ant usuall a series of tic2ets" not )ust a single tic2et.
• Each tic2et includes origin" destination" flight information" and seat
information.
$
Figure &6 Class diagram for >rder pattern
#olution
A variation of the >rder pattern 49%:5 satisfies the forces. 1he class model of Figure &
sho,s the re;uired information" including classes to descri0e the series of tic2ets
41ic2etSeries5" the passenger ,ho needs that order 43assenger5" and t,o catalogs of
tic2ets 41ic2et!oute and 1ic2etUnit5. 1ic2et!oute is used for arranging the schedule
of Flight and 1ic2etUnit is used for price.chec2ing or even later chec2.in. Each
1ic2et!oute o0)ect consists of several 1ic2etUnit o0)ects. 1he corresponding
se;uence diagram is given in Figure < sho,ing ho, to place an order for a series of
tic2ets.
Figure <6 Se;uence diagram for >rder pattern
%
3assenger 1ic2etSeries
0oo2
1ic2et!oute
1ic2etUnit
id4?accountB56
String
credit7nfo6 String
tic2etseriesB6 String
0oo2date6 String
&
tpe6 'one.,a" round.trip*
tripCsource6 String
tripCdestination6 String
tic2etB6 String
origin6 String
destination6 String
flightDB6 String
class6 'A" B" C*
seatB6 String
&..<
&..E
&..E
&..E
63assenger 61ic2etSeries 61ic2et!oute 61ic2et.& 61ic2et.<
F
re;uest
chec2 availa0ilit
chec2 availa0ilit
confirmed 41ic2et.&5
chec2 availa0ilit
confirmed 41ic2et.<5
F
confirmed 41ic2et.n5
sho,.price
0oo2
0oo2 tic2et 41ic2et.&5
confirm 41ic2et.&5
0oo2 tic2et 41ic2et.n5
confirm 41ic2et.n5
F
F
confirm 41ic2etSeries5
onse$uences
• 1his pattern descri0es onl the ordered tic2ets" it must 0e complemented ,ith
other aspects e.g." seat and flight information.
• 1ic2etSeries in this pattern ma 0e an other product ,ith multiple units.
• 1he customer ,ho places an order ma 0e a person or a corporation. @ere ,e
onl focus on the passenger ,ho ,ill get the tic2et4s5 and use it 4them5. /e
could use a customer ,ith t,o roles for this purpose.
• 1he re;uested tic2ets refer to a series of products. 1heir relationship and detail
processing are discussed later in other patterns.
• Deliver" pament" and identification details are not included.
<.$ Assignment pattern
onte!t
A 1ic2etUnit is assigned to a Seat" Flight" and Span.
"roblem
@o, to correlate several o0)ects such as seat" flight" and span under the aspect of one
tic2et unitA
Forces
• 1he function of 1ic2etUnit is fulfilled 0ased on related information from the
assigned classes.
• 1ic2etUnit is a class different from its assigned classes. 7t has rights to access
the information of the assigned classes 0 the assignment.
• 1he availa0ilit of a seat and the feasi0ilit of a connecting span and its
connecting flight must 0e confirmed.
#olution
1he Assignment 3attern satisfies these forces. Figure $ sho,s classes 41ic2etUnit"
Seat" Span" and Flight5 and their assignment relationship.
G
Figure $6 Class diagram for the Assignment pattern 41ic2etUnit5
onse$uences
• 1his pattern ma 0e used for assignment of other tpes of items" i.e." an assignment
to Facult" Student and Staff in a universit department information sstem.
• From the assignment" 1ic2etUnit can access the related information of
assigned classes and provide seat information for a certain span of a flight.
• Constraints defined on 1ic2etSeries help to confirm the connecting tic2etUnit 0ased
on availa0le seat" connecting flight and connecting span.
• Availa0le seat" connecting flight and connecting span are discussed later in other
patterns
<.% Collection pattern
onte!t
1he availa0ilit of a seat as a part of the plane for a flight is chec2ed.
"roblem
@o, to descri0e the relationship 0et,een a whole o0)ect and other o0)ects as its parts, ,here
the collected o0)ects are similar 0ut have their o,n identitiesA
H
1ic2etSeries
1ic2etUnit
Flight
Seat
Span
'availa0le seatB*
tic2etseriesB6 String
0oo2date6 String
origin6 String
destination6 String
tic2etB6 String
flightB6 String
schedule6 #istIdeparture time"
arrival time" stopJ
seatB6 String
'connecting flights have
connecting schedule*
&..E
'availa0le series tic2ets*
'connected spans*
Assignment 3attern
association as class
dependence of constraints
Forces
• An entit has a certain num0er of similar units. For e-ample" each seat is a
part of a plane= the plane has glo0al information and 2no,s if a seat ,ith a
specific seat num0er in a re;uested class is availa0le.
• 1here is a whole class and a part class. For e-ample" a plane has a ,hole?part
4/35 relationship ,ith its related seats.
• Based on that /3 relationship" one can chec2 the availa0ilit of units"
• An availa0le seat implies an un0oo2ed seat num0er in the class list of a plane
assigned to the flight.
Figure %6 Class diagram for Collection pattern 4Seat and 3lane5
#olution
1he Collection 3attern 9<: satisfies the forces ,hen interpreted according to the
!eservation pattern of 9G:. 1he class model for such a pattern is sho,n in Figure %.
onse$uences
• 1his pattern ma 0e used for an whole o0)ect and its part o0)ects. 1his is 0oth an
analsis and a design pattern.
• 1o chec2 if a seat in a re;uested class is availa0le" the seat (part o0)ect5 should 2no,
the capacit and class information of a plane 4its whole o0)ect5. Alternativel" a plane
should 2no, if all seats are 0oo2ed from this /3 relationship.
• Constraints defined on Seat help to confirm the availa0le seats of a plane ,hich is
assigned to a flight.
K
3lane
Flight
Seat
assignedCto
'availa0le seatB*
flightB6 String
schedule6 #istIdeparture time"
arrival time" stopJ
seatB6 String
tpe6 String
noB6 String
seatCapacit6 7nfo#ist
class7nfo6 7nfo#ist
'a plane has a
fi-ed num0er
of seats in
a class
&..E
&
E
'connecting flights have
connecting schedule*
dependence of constraints
Collection 3attern
• >ther parts of 3lane and other information ,hich are not related to reservation are
not included.
<.G Connection pattern
onte!t
7n a set of o0)ects" each of them ma have a relationship to some others. An airport is
connected ,ith another 0 an airlin2. A span is connected to another if the destination
of the preceding span is also the origin of the succeeding one. A span is also
connected to another if the destination of the preceding span is connected ,ith the
origin of the succeeding one 0 other means of transportation. 7f there is another 2ind
of connection 0et,een these t,o airports ,e use other.lin2 4see Figure G5. A flight is
connected to another if and onl if airport4s5 0et,een t,o connected spans has 4have5
a connecting schedule ,hose arrival time is 0efore departure time.
Figure G6 Class diagram for Connection pattern
"roblem
@o, to descri0e a relationship 0et,een o0)ects in the same classA
Forces
• An o0)ect should 0e connected to another in the same class 0 a semantic
relationship.
#olution
1he Connection 3attern satisfies these forces. Figure G sho,s the applications of such
a pattern for connecting flights" connecting spans" and connecting airports.
L
Airport
Flight
Span
origin6 String
destination6 String
flightB6 String
schedule6 #istIdeparture time"
arrival time" stopJ
name6 String
cit6 String
'connecting condition*
&..E
&
&..E
&
otherClin2 aCconnectedC0
aCconnecting
&..E
&
fCconnecting
'connecting flights have
connecting schedule* 'connection 0et,een
different spans*
sCconnecting
Connection 3attern Connection 3attern
Connection 3attern
onse$uences
• A connecting association relationship is used to descri0e the connection
0et,een t,o related o0)ects in the same class.
• 1his pattern descri0es a series of o0)ects such that each of them has a
connection to some others.
• 1his pattern ma 0e used for an other tpe of relationship in a class= e.g."
managers and emploees.
• Constraints defined on a class help to confirm the connection 0et,een related
o0)ects
• Some of the details of the connection are discussed later in other patterns.
<.H !outing pattern
onte!t
A flight route represents a collection of connecting air lin2s that can 0e used together
to form a span for the passenger to travel from start to termination using this flight.
"roblem
@o, to descri0e a choice among a set of related o0)ectsA
Forces
• Each Flight o0)ect has a route from the origin airport to the destination airport.
Bet,een the origin and the destination" there ma 0e several intermediate
stops. An airlin2 ,hich lin2s an airport 4called preceding airport5 to another
4called succeeding airport5 ,ithout intermediate stops is called a basic airlin.
7n a route" t,o 0asic airlin2s are called MconnectedN if and onl if the first
airlin2 ends at the preceding airport of the second airlin2. 1,o 0asic air lin2s
in different routes are called connected if and onl if these t,o airlin2s are
connected at one airport or the succeeding airport of the first airlin2 is
connected ,ith the preceding airport of the second airlin2 0 other means of
transportation. A route is a set of connected 0asic airlin2s connecting all the
airports through ,hich it passes.
• All the 0asic connection airlin2s are availa0le for a passenger to choose as
part of a span in a path from source to destination of his trip.
O
#olution
A 3ath 3attern 9K: can satisf the forces. 1he class model for such a pattern is sho,n
in Figure H4a5 and its application in our reservation sstem is sho,n in Figure H405.
Figure H6 Class diagram for 3ath pattern and its application in the reservation sstem
onse$uences
• A span is a part of route of a flight" and the choice of a span is 0ased on
several availa0le connected airlin2s in a flight route. For the convenience of
customers" ,e should list the airlin2s of all the airlines. 1he customerPs re;uest
,ill 0e satisfied if there is an availa0le connecting span" even ,hen it
0elongs to a different airline.
• 1his pattern ma 0e used for an other selection of a set of related o0)ects.
• Based on the pattern" connected 0asic airlin2s in a route of a flight provide a
set of availa0le spans. A passenger ma select a su0set of airlin2s in a route to
form a span from its origin to destination. 1he trip can 0e e-tended 0 other
connecting spans from the destination of the preceding span. /ith all the
connected spans in different flight routes" a passenger ma fulfill a series of
trips from source to destination.
• Constraints defined on connecting flights and connecting spans need that the
Airlin2 provides connection for different airlin2s. 1he constraints on
&Q
Airlin2
!oute
Flight
Span
dependence of constraint
origin6 String
destination6 String
flightB6 String
schedule6 #istIdeparture time"
arrival time" stopJ
airlineClin2B6 String
origin6 String
destination6 String
't,o connecting
airlin2sA*
'connection
0et,een 0asic
airlin2s in a
route*
'connection of
airlin2s 0et,een
different
routes*
&..E
&..E
& &
su0set
0asic
&..E
&
'connecting flights have
connecting schedule*
'connection 0et,een
different spans*
Airlin2
3ath
airlineClin2B6 String
origin6 String
destination6 String
&..E &..E
& &
su0set
0asic
4a5
405
connecting flights are 0ased on the connection 0et,een t,o airlin2s in
different routes. 1he constraints on connecting spans are 0ased on the
connection 0et,een different spans. Dependence of constraints is sho,n in
Figure H405.
• Since Airlin2 is an association class for airports" it is 0etter to define
connecting airlin2s 0ased on the effect of constraints propagated to Airport.
1,o airlin2s are connected if and onl if their 0asic units 4airports5 satisf the
connecting condition. 1here is no need to add another connection to the class
Airlin2. >ther,ise" it is difficult to 2eep consistenc 0et,een these t,o 2inds
of definition.
<.K !ole o0)ect pattern
onte!t
1o support the descriptions for different airlin2s" the airports are descri0ed as >rigin"
7ntermediate" and Destination. An airport usuall plas several roles.
"roblem
@o, to model role aspects of an o0)ect as separate role objects that are dnamicall
attached to and removed from that o0)ect 4core object!.
Forces
• An airport ma have different roles for routes and spans at the same time. 7n a
route" an airport and its connected airlin2s indicate the availa0le connection
provided 0 a flight. 7n a span" an airport and its connected airlin2s indicate
the selection of reservation 0 the passenger.
• An airport ma change its roles dnamicall" that is" at runtime" rather than
fi-ing them staticall at some moment.
• A relationship 0et,een an airport and its roles is independent from each other
so that changes to a role do not affect airlin2s that are not involved in that role.
#olution
1he !ole >0)ect 3attern can satisf these forces. A core o0)ect usuall plas several roles and
the same role is li2el to 0e plaed 0 different core o0)ects. /hen a core o0)ect is currentl
plaing the re;uested role" it is in a role specific ,a and meets an re;uest for that role.
&&
Using the configuration in 9&:" Figure K sho,s the class model for such a pattern and its
application for class Airport in our reservation sstem.
Figure K6 Class diagram for !ole >0)ect pattern
onse$uences
• 1he interface 0et,een airports and its roles supports dnamic changes.
• !oles can evolve easil and independentl of each other. E-tending the
component interfaces is ver eas.
• !ole o0)ects can 0e added and removed dnamicall in a soft,are implementation of
this model. A role o0)ect can 0e added and removed at runtime" simpl 0 attaching it
to and detaching it from the core o0)ect.
• Applications are 0etter decoupled. B e-plicitl separating the component interface
from its roles" the coupling of applications 0ased on different role e-tensions is
decreased.
After descri0ing all these aspects" a composition of them for a reservation sstem is presented
in the ne-t section.
$. !eservation pattern and its domain analsis
%ntent 1his pattern descri0es the placement of an order for a series of tic2ets.
onte!t
Figure L sho,s some specific e-amples of the ,a of using such a sstem. Customer
A ,ants to ma2e a reservation in Dallas 4DA#5 on L?<O?QQ 488?DD?RR5 for a
&<
Airport!ole Airport
>rigin
7ntermediate Destination
name6 String
cit6 String
departureCtime6 Date
par2ingClot6 7nteger
arrivalCtime6 Date
departureCtime6 Date
hotels6 String
arrivalCtime6 Date
near0Chotel6 String
role1pe6 'routeCt"
spanCt*
Q..E
core
roles
shanghai
1o2o
@ong2ong
#os Angeles 4#AS5
Dallas 4DA#5
8iami 487A5
Te, Ror2 4TR5
Customer A 0oo2ed in Dallas" on L?<O?QQ.
6 round.trip" Dallas →#os Angeles O?%?QQ.
Customer B 0oo2ed in Shanghai" on K?L?QQ.
6 one.,a" Shanghai →8iami O?H?QQ"
Te, Ror2 →#os Angeles O?&&?QQ.
Customer B changed his reservation.
6 one.,a" Shanghai →Dallas O?H?QQ.
Customer B 0oo2ed for his friend.
6 one.,a" @ong2ong →Dallas O?%?QQ.
LGL I/$6QQpm" /K6QQpmJ
$HL I/%6$Qpm" /&<6$QpmJ
LOL I8O6QQam" 8O6QQamJ
LQ% IFO6QQpm" SH6$QamJ
LQ$ I8L6QQpm" 8&&6$QpmJ
IFH6QQam" F<6$QpmJ
0usiness round.trip to #os Angeles 4#AS5 ne-t ,ee2. Customer " has a conference in
#os Angeles. Before 0eing there" he ,ants to travel to several cities in the United
States. Starting from Shanghai" he plans to go to first to 8iami 487A5. 1hen" he ,ill
go along the east coast 0 car. 7t ,ill ta2e him several das until he arrives at Te,
Ror2 4TR5. From TR" he continues the trip 0 plane and arrives at #AS 0efore
O?&<?QQ. @e ,ants to ma2e a reservation for such a trip. But a friend visiting in
@ong2ong 4@U5 as2s customer " to ma2e a reservation for him and his famil 4 ,ife
and daughter 5 to Dallas 4from @U5. To, he ,ants to change his reservation and
ma2e another reservation for the friend and his famil so that he can sta ,ith his
friend at Dallas for t,o das. 1hese e-amples include some particular cases of a more
general order pro0lem for a series of tic2ets.
Figure L6 Some e-amples using the reservation sstem
Forces
• 1he re;uested tic2ets and the relationships 0et,een them must 0e captured in
a precise ,a. !e;uests ma 0e individual or group re;uests. A reservation
ma change over time.
• Since the pattern is ,ell organized" interfacing ,ith a e-ternal sstem" i.e." an
accounting sstem" is ver eas 0ut the access point is limited.
• 1he pattern must descri0e a fundamental semantic connection. 1his means the
pattern must 0e simple enough to appl to a variet of related situations.
#olution
&$
1he classes contained in the model 4see Figure O5 include 3assenger"
1ic2etSeries" 1ic2etUnit" 1ic2et!oute" Flight" Span" Seat" 3lane" !oute" Airlin2"
Airport" Airport!ole" >rigin" 7ntermediate" and Destination.
Figure O6 Class diagram for the reservation sstem
Using such a sstem" customer A can select an availa0le flight among all those
passing through the span from DA# to #AS" i.e." LQ$ I # $6 QQpm, # %%6 &'pm(
F) 6 ''am, F* 6 &'pm J" and select another to come 0ac2" i.e." $HL I +, 6 &'pm,
+%*6 &'pm J. Although the route of flight LQ$ covers the span from #AS to DA#
and he ma select flight LQ$ for his tic2et" he does not use such a flight 0ecause he
does not ,ant to ,ait until Frida. @e disconnects the relationship of tic2et for the
0ac2 trip and resets it to an earlier flight 4flight $HL5. @e ,ill get a series of tic2ets
,ith t,o sets of round.trip tic2et units. 1he first one is for the trip from DA# to #AS
and the second one is for the trip 0ac2 to DA#. Each tic2et unit in a set represents a
span using a part of a route of the flight. For e-ample" customer A uses the part of
route of flight LQ$ from DA# to #AS and that of flight $HL 0ac2 to DA#. A trip in
an set can 0e e-tended 0 a tic2et ,ith a connecting span. 1he e-tension ,ill 0e
discussed in the ne-t e-ample for customer ". An airport in the trip ma have
different roles for route and span. For e-ample" DA# is an intermediate stop for the
&%
Airport!ole
Airlin2
Airport
!oute
3lane
3assenger 1ic2etSeries
0oo2
1ic2et!oute
1ic2etUnit
Flight Seat
Span
assignedCto
association as class
implied relationship or dependence
'availa0le seatB*
>rigin 7ntermediate Destination
id4?accountB56 String
credit7nfo6 String
tic2etseriesB6 String
0oo2date6 String
& E
tpe6 'one.,a" round.trip*
tripCsource6 String
tripCdestination6 String
origin6 String
destination6 String
tic2etB6 String
flightB6 String
schedule6 #istIdeparture time"
arrival time" stopJ
seatB6 String
tpe6 String
noB6 String
seatCapacit6 7nfo#ist
class7nfo6 7nfo#ist
'a plane has a
fi-ed num0er
of seats in
a class
name6 String
cit6 String
departureCtime6 Date
par2ingClot6 7nteger
arrivalCtime6 Date
departureCtime6 Date
hotels6 String
arrivalCtime6 Date
near0Chotel6 String
role1pe6 'routeCt"
spanCt*
airlineClin2B6 String
origin6 String
destination6 String
Q..E
core
roles
'connecting condition*
&..E
&
&..E
&
otherClin2
aCconnectedC0
aCconnecting
't,o connecting
airlin2sA*
'connection
0et,een 0asic
airlin2s in a
route*
'connection of
airlin2s 0et,een
different
routes*
&..E &..E
& & su0set
0asic
&..E
&
&..E &
E
&..E
&
fCconnecting &..E
'connecting flights have
connecting schedule*
&..<
&..E
&..E
'availa0le series tic2ets*
'connection 0et,een
different spans*
sCconnecting
route of flight LQ$ 0ut it is also an origin airport for the span from DA# to #AS. 1o
chec2 if there is an availa0le seat in the re;uested class" the detail capacit and class
information of planes I "-)-, &$& J and I "-&-, &LO J ,hich are assigned to flights
LQ$ and $HL can 0e accessed 0 the collection of re;uested seats. 7f the re;uested seat
is not availa0le and there is no more availa0le seats in the plane" he ma use another
flight. Finall" customer A ,ill 0e satisfied 0 a seat in the plane. As sho,n in
Figure&Q" "%- in I "-)-, &$& J and .%* in I "-&-, &LO J are such seats he can 0oo2
Figure &Q6 Domain analsis of a reservation sstem for customer A 4round.trip5
Using the same sstem" customer " can select a series of connecting spans for the one.,a
trip from Shanghai to #AS 0ased on all the 0asic airlin2s supported 0 connecting flights. As
sho,n in Figure &&" among all the 0asic airlin2s" he selects span I Shanghai,/A0J and its
connecting span I /A0, #1A J ,hich are part of routes of flight LGL and its
connecting flight $HL to go to 87A. Flight LGL is connected 0 flight $HL at #AS
0ecause the arrival of flight LGL at #AS is t,o hours earlier than the departure of
flight $HL in the same da. 1he trip 0 flight LGL is e-tended 0 flight $HL from #AS
to 87A. From 87A" the passenger ,ill go to TR 0 car= that is" there is an other.lin2
relationship 0et,een 87A and TR. As the arrival time of TR is earlier than the
&G
>rigin
Destination
I/H6$QpmJ
span!ole
I8 &&6$QpmJ
I#AS" FJ
IDA#" FJ
ITo.<$%" DA#" TRJ
ITo.&<$" #AS" DA#J
Airlin2
Airport
!oute
3lane
3assenger 1ic2etSeries
0oo2
1ic2et!oute
Ione.,a" DA#" #ASJ
customerCA
IDallas" $$&QQQ<"QL<OQQJ
1ic2etUnit
Flight
Seat
Span
B&
B<
B$
ITR" #AS= #AS" TRJ
IBKHK" &$&J
assignedCto
su0set
E&Q
F&<
contain
association as class
connecting 4relationship5
implied relationship or dependence
o0)ect entit
disconnected relationship
ILQ$" 8L6QQpm" 8&&6$QpmJ
I$HL" /%6$Qpm" /&<6$QpmJ
I#AS" 87AJ
ITo.%" #AS" DA#J
ITo.<" DA#" 87AJ
I8 &Q6$QpmJ
IDA#" #ASJ
I #AS" DA#J
IBK$K" &LOJ
ITo.$" DA#" #ASJ
ITo.<$" TR" DA#J
I/%6$QpmJ
Ione.,a" #AS" DA#J
Iround.trip" DA#" #ASJ
'availa0le seatB*
>rigin
7ntermediate
Destination
route!ole
I/H6$Qpm" /K6QQpmJ
I8 &Q6QQpm" 8&Q6$QpmJ
I8 &&6$QpmJ
I/%6$QpmJ
departure time of flight LQ$" the passenger ma select the connecting span of flight
LQ$ from TR to #AS after a trip from Shanghai to Te, Ror2. 1he connection
condition and its satisfaction ,hich is re;uested 0 the customer and supported 0 the
routes of flights are used to chec2 the feasi0ilit of spans for the trip. 1he availa0ilit
of the seat4s5 in the plane assigned to the route of the used span is chec2ed for the
reservation. 7f there is no availa0le seat in the plane" the customer should select
another set of connecting spans to reach the destination of his trip. After the chec2"
customer " ma2es a reservation for the availa0le series of tic2ets ,ith three one.,a
tic2et units 4see Figure &&5.
Figure &&6 Domain analsis of a reservation from Shanghai to #AS for customer B
&H
>rigin
7ntermediate
Destination
I/ $6$QpmJ
span!ole
I/H6QQpm" / H6$QpmJ
I8 &Q6QQpm" 8&Q6$QpmJ
I/ <6QQpmJ
I8 &&6$QpmJ
IShanghai" FJ
I#AS" FJ
IDA#" FJ
ITo.&K%" Shanghai" #ASJ
ITo.G" #AS" DA#J
ITo.&<$" #AS" DA#J
Airlin2
Airport
!oute
3lane
3assenger 1ic2etSeries
0oo2
1ic2et!oute
Ione.,a"Shanghai" #ASJ
customerCB
IShanghai" <QLHQ$<"QKQLQQJ
1ic2etUnit
Flight
Seat
Span
I$HL" /%6$Qpm" /&<6$QpmJ
IShanghai" DA#J
B&
B<
B$
IShanghai" DA#J
IBK%K" K$&J
assignedCto
C&&
su0set
E&Q
F&<
contain
association as class
connecting 4relationship5
implied relationship or dependence
o0)ect entit
disconnected relationship
ILGL" /$6QQpm" /K6QQpmJ
ILQ$" 8L6QQpm" 8&&6$Qpm=
FH6QQam" F<6$QpmJ
I#AS" 87AJ
ITR"#AS= #AS" TRJ
ITo.%" #AS" DA#J
ITo.<" DA#" 87AJ
I87A" FJ
ITR" FJ
I/ %6$QpmJ I8 L6QQpmJ
IDA#" 87AJ
ITR" #ASJ
IBK$K" &LOJ
IBKHK" O<&J
ITo.$" DA#" #ASJ
ITo.<$" TR" DA#J
I/&<6QQpmJ
Figure &<6 Domain analsis of a changed reservation for customer B
After 0eing as2ed 0 his friend from @ong Uong" customer " ,ants to change his
reservation so that he can sta at Dallas t,o das ,ith his friend. @e selects the
simplest span for him to go to DA#. 7nstead of using the connecting spans of flight
LGL and flight $HL" he selects the span directl to DA# from the 0asic airlin2s in the
route of flight LGL. After t,o das" he continues his trip to 87A using a connecting
span of connecting flight LQ%. 7t is advantageous here to 2eep most of the feasi0le
parts of the trip and change to an plan ,ith the most 0enefit dnamicall and easil.
7n Figure &<" the customer onl changes the connecting spans at DA# and chooses the
simplest span to reach DA#. 1he related connecting flights and the connecting spans
0ased on the 0asic airlin2s of the routes ,hich are alread availa0le in the sstem
provide an eas change 4see in Figure &<5.
&K
>rigin
7ntermediate
Destination
I/$6$QpmJ
span!ole
I8 &Q6QQpm" 8&Q6$QamJ
I/ <6QQpm" /<6$QpmJ
I8 &&6$QpmJ
IShanghai" FJ
I#AS" FJ
IDA#" FJ
ITo.&K%" Shanghai" #ASJ
ITo.G" #AS" DA#J
ITo.&<$" #AS" DA#J
Airlin2
Airport
!oute
3lane
3assenger 1ic2etSeries
0oo2
1ic2et!oute
Ione.,a"Shanghai" #ASJ
customerCB
IShanghai" <QLHQ$<"QKQLQQJ
1ic2etUnit
Flight
Seat
Span
I$HL" /%6$Qpm" /&<6$QpmJ
IShanghai" DA#J
B&
B<
B$
IShanghai" DA#J
IBK%K" K$&J
assignedCto
B&H
su0set
E&Q
F&<
contain
association as class
connecting 4relationship5
implied relationship or dependence
o0)ect entit
disconnected relationship
the change of the reservation
ILGL" /$6QQpm" /K6QQpmJ
ILQ$" 8L6QQpm" 8&&6$Qpm=
FH6QQam" F<6$QpmJ ILQ%" FO6QQpm" SH6$QpmJ
I#AS" 87AJ
ITR"#AS= #AS" TRJ
ITo.%" #AS" DA#J
ITo.<" DA#" 87AJ
ITo.<O" @U" 1o2oJ
ITo.G$%" 1o2o" #ASJ
I87A" FJ
ITR" FJ
IS $6QQamJ I8 L6QQpmJ
IDA#" 87AJ
ITR" #ASJ
IBK$K" &QOJ
IBKHK" O<&J
ITo.$" DA#" #ASJ
ITo.<$" TR" DA#J
I/K6QQpmJ
IS H6$QamJ
Figure &$6 Domain analsis of reservation for the friend and his famil
For the friend and his famil" customer " selects flight LOL and ma2es a reservation
for three seats in the same trip. As sho,n in Figure &$" there is a series of one.,a
tic2ets for the friend. Each tic2et unit is assigned to the flight LOL 4from @U to DA#5"
a seat of the plane" and the span 0ased on the route of such a flight. E-cept for the
seat" all the tic2et units share the same information of this trip. Duplicate copies of the
information for airports and flights are avoided in such a sstem. 1his simplifies the
process of finding the feasi0le spans and availa0le seats for all in the famil. 7t also
facilitates the management of the information for airports and flights.
1he domain analsis of the reservation sstem is presented in Figures &Q" &&"
&<" and &$" 0ased on the a0ove e-amples. /ith the effect of constraints" all the tic2ets
descri0ed in this pattern are guaranteed to satisf the customerPs re;uest. 1his pattern
also sho,s its effectiveness and fle-i0ilit to serve different orders ,ith dnamic
changes.
&L
>rigin
7ntermediate
Destination
I8 O6QQamJ
span!ole?route!ole
I8 K6QQam" K6$QamJ
I8 &&6$Qam" &&6QQamJ
I8 O6$QamJ
I@U" FJ I#AS" FJ
I1o2o" FJ
IDA#" FJ ITo.<O" @U" 1o2oJ
ITo.G$%" 1o2o" #ASJ
ITo.&<$" #AS" DA#J
Airlin2
Airport
!oute
3lane
3assenger 1ic2etSeries
0oo2
1ic2et!oute
Ione.,a"@U"DA#J
friend of
customerCA
IShanghai" <QLHQ$$"QKQLQQJ
1ic2etUnit
Flight
Seat
Span
ILOL" 8O6QQam" 8O6QQamJ I@U" DA#J
B&
B<
B$
I@U" DA#J
IBK%K" %Q&J
assignedCto
C&L
su0set
D&L B&L
contain
association as class
connecting 4relationship5
implied relationship or dependence
o0)ect entit
%. Conclusions and discussion
1he model generated satisfies the forces6
• 1he pattern descri0es the re;uest and satisfaction of tic2et4s5 for different
tpes of trip
• 1he pattern can 0e used as a more a0stract pattern. Using other tpes of product
instead of source and destination" the pattern can appl to an reservation sstem for
a series of products. 1he products ma 0e different in different applications.
• Documents for account service and other airport services are considered part
of the e-ternal sstems and are not represented in the pattern.
• 1he effect of other activities can 0e reflected through appropriate operations.
• Considering the composition" analsis of functional aspects 0ased on Use
Cases is used here to avoid overlapping of the composite sstem. 1he !ole
>0)ect pattern is used to support dnamic 0inding of composite functionalit
and domain analsis is used to descri0e the sstem in a precise ,a and to
avoid a conceptual gap 0et,een related classes.
7n order to ma2e the pattern applica0le to other cases" ,e have left out6
• Details of the items" such as operations for each service.
• E-ceptions" e.g." unavaila0le tic2et" delas" and flight cancellations.
• Alarms.
• @istorical information.
• Billing and pament policies" e.g." order cancellation and refunding.
• 3ersonal identification.
1hese aspects should 0e completed ,ith additional patterns.
>ur approach involves the use of o0)ect.oriented methods and Semantic Analsis
3atterns. B solving this tpe of pro0lems using o0)ect.oriented methods ,e reap the
general 0enefits of this approach" i.e." reusa0ilit" e-tensi0ilit" and conceptual
a0straction. 7t is recognized 0 researchers and practitioners that o0)ect.oriented
&O
methods are superior to procedural approaches for handling comple- sstems. 1his
superiorit e-tends to our approach. 1he general use of patterns is considered an
advance in o0)ect.oriented methods 0ecause patterns distill the 2no,ledge and
e-perience of man developers and are highl reusa0le. 3atterns also improve
soft,are ;ualit 0ecause the have 0een scrutinized 0 man. Analsis and design
patterns have improved productivit and ;ualit in soft,are development. >ur
Semantic Analsis 3atterns are larger than standard analsis patterns and have 0een
sho,n to ease the tas2 of 0uilding conceptual models 9$:. 7n this paper ,e have added
to those properties the a0ilit to compose patterns to 0uild comple- models. /hile
e-periments ,ith actual pro)ects is necessar to prove the practicalit of this
approach" ,e can sa that this methodolog is a 0etter ,a to 0uild comple- sstems
than procedural programming or ad.hoc o0)ect.oriented methods. /e have also
sho,n our approach to 0e convenient to improve practical approaches such as S3 9H:"
,hich is another proof of its possi0le value. 1here are other o0)ect.oriented
approaches 0ased on patterns" e.g." a recent U8# 0oo2 discusses several approaches
9L:" and ,e donNt claim that our approach is 0etter than an of these methods" this
,ould re;uire a detailed and length stud. /e do claim that our approach allo,s us
to 0uild comple- models in a convenient and error.free ,a.
7t is clear that soft,are for flight reservation defined according to the re;uirements of
Section < is used in man places. 1his soft,are has 0een designed either 0 the
procedural approach 4most li2el5 or 0 o0)ect.oriented methods 4in the most recent
cases5. @o,ever" our 7nternet search did not ield an complete e-amples" onl trivial
portions in some te-t0oo2s. /e cannot then compare our solution to other solutions to
this specific pro0lem" 0ut it ,as not our aim here to sho, a 0etter solution to this
pro0lem" the e-ample ,as selected 0ecause it ,as comple- enough to sho, the value
of our approach. Based on the discussion a0ove" ,e ,ould e-pect our solution to this
specific pro0lem to 0e easier to develop" more fle-i0le" and more reusa0le than most
solutions.
G. !eferences
9&: D. Baumer" D. !iehle" /. Si0ers2i" and 8. /ulf" MM!ole >0)ectNN" Chapter < in
Pattern /anguages o2 Program 3esign %" Addison. /esle" <QQQ.
Also in http6??)err.cs.uiuc.edu?Vplop?plopOK?/or2shops.htmlBW<
9<: F. Buschmann" !. 8eunier" @. !ohnert" 3. Sommerlad" and 8. Stal" Pattern-
oriented so2tware architecture, /ile &OOH.
9$: E.B. Fernandez and S. Ruan" XSemantic Analsis patternsY" Procs. o2 %4
th
1nt.
.on2. on .onceptual #odeling, 56*'''" &L$.&OG.

<Q
9%: E.B. Fernandez" S. Ruan" and S. Bre" MM Analsis 3atterns for the >rder and
Shipment of a 3roductNN" Procs. o2 Pattern /anguages o2 Programs .on2erence"
3#o3 <QQQ" http6??)err.cs.uiuc.edu?Vplop?plop<2.
9G: E.B. Fernandez and S. Ruan" MMAn Analsis 3attern for !eservation and Use of
!eusa0le EntitiesNN" Procs. o2 Pattern /anguages o2 Programs .on2erence, 3#o3NOO.
http6? ?st.,,,.cs.uiuc.edu?Vplop?plopOO
9H: E.B.Fernandez" ZBuilding comple- o0)ect.oriented sstems ,ith patterns and
S3Y" Procs. o2 0P 7niverse (1nternational .on2erence on 58treme Programming!,
!aleigh" TC" Jul <$.<G" <QQ&.
9K: S. Shlaer and S. J. 8el7or" MMAn >0)ect.>riented Approach to Domain AnalsisNN"
in Object /i2ecycle9 #odeling the +orld in States, 3rentice @all" Engle,ood Cliffs"
Te, Jerse" &OO&.
9L: U. Siau and 1. @alpin" Eds." 7ni2ied #odeling /anguage9 Systems Analysis"
3esign and 3evelopment 1ssues" 7DEA [roup 3u0lishing" @ershe" 3A" <QQ&.
<&