Upload
erick-taylor
View
212
Download
0
Embed Size (px)
Citation preview
1
Case Study: Purchase Ticket
2
Overview
• “Purchase Ticket by Check” Use case.
• Sequence Diagrams.
• Conceptual Model.
• Contracts.
3
Purchase Ticket by Check Use case
Actor: Customer (initiator), clerk Purpose: Reserve seats on an airplane and capture their check payment.
Overview A customer arrives at the counter requesting to purchase tickets. The clerk finds a suitable flight and reserves seats on it for him\her. The customer pays for the tickets with check. When done, the customer leaves with purchased tickets Type: Primary and Essential
4
Expanded Use Case Format: Use Case: Purchase Ticket by Check Use case
Typical course of actions:
5
Expanded Use Case Format: Use Case: Purchase Ticket by Check Use case
Typical course of actions:
Alternatives: - Line 3, if there are no available flights on the specified date, the system displays flights on the day before and the day after.Line 7, if the customer asks for more tickets than seats available on the chosen flight; ask him\her to change either flight or number of tickets.
6
SSD:
clerk
SubmitFlightInfo(Dep-city,Des-city,date)
Available Flights.
ChooseFlight(Flight_Num)
Flight Info
EnterRsvInfo(Passnum,Flightclass)
EnterSpeciRequst(Reqinfo)
available
Airline notified
7
SSD (cont.):
clerk
Total amount
Paid(amount ,customerId)
CompleteResv(true)
8
Conceptual Model:
Candidate concepts:•Customer•Ticket•Clerk•Dep_city•Des_city•Date•Flight•Flight info•Num of passengers•Passenger•Flight class•Sale transaction.•seat
What are the objects (concepts) the real things in my domain ?
• Special Request: handicap access, meal• Airline • Total• Check• Travel agency • Customer ID
9
Conceptual Model:
What are the objects (concepts) the real things in my domain ?
10
Conceptual Model:
CustomerCustomerCus_idNamePhone
Cus_idNamePhone
CheckCheck
FlightFlight
TicketTicket
Clerk_idName
Clerk_idName
ClerkClerk
check_idAmountcheck_idAmount
NumDep-cityDes-ciyt
Date
NumDep-cityDes-ciyt
Date
numPass_name
ClassHandicap
MealPrice
numPass_name
ClassHandicap
MealPrice
namename
AirlineAirline
Sale TransactionSale Transaction
DateTimeDateTime
Special requestsSpecial requests
R_IDhandicap
Meal
R_IDhandicap
Meal
SeatSeat
S_numstatusS_numstatus
11
Conceptual Model:
CustomerCustomerCus_idNamePhone
Cus_idNamePhone
Clerk_idName
Clerk_idName
CheckCheck
FlightFlight
TicketTicketClerkClerk
check_idAmountcheck_idAmount
NumDep-cityDes-ciyt
Date
NumDep-cityDes-ciyt
Date
numPass_name
ClassHandicap
mealprice
numPass_name
ClassHandicap
mealprice
namename
AirlineAirline
requests
1
Belongs to1 *
has *1
Paid by
1 1
Involved in
*
1
Sale TransactionSale Transaction
DateTime
Is_complete
DateTime
Is_complete
1
*
Associates with
*
SeatSeat
S_numclass
status
S_numclass
status
*
1
includes
12
Contract CO1
Contract CO1: Submit Flight Info
Operation: SubmitFlightInfo(Dep-city,Des-city,date)
Cross Reference: Use Case: Purchase Ticket By check
Precondition: clerk, airlines, flights, seats information registered in
the system.
Post conditions: None
13
Contract CO2Contract CO2: Choose FlightOperation: ChooseFlight(Flight_Num) Cross Reference: Use Case: Purchase Ticket By checkPrecondition: clerk, airlines, flights,seats information registered in the system.Post conditions: •Sale transaction ST was created (instance creation)•Customer instance C was created (instance creation)•C was associated with ST (association formed)•ST attributes were initialized (attribute modification)•ST was associated with flight F, based on flight num (association formed)•ST was associated with Clerk CK (association formed)
14
Contract CO3
Contract CO3:Enter Reservation Info
Operation: EnterRsvInfo(Passnum, FC Flightclass,Flight number)
Cross Reference: Use Case: Purchase Ticket By check
Precondition: Sale transaction (ST)is running
Post condition:
Seat S.status =false was updated for each S with Flightclass FC based
on Flight num (attribute modification)
15
Contract CO4
Contract CO4: Enter Special Requst
Operation: EnterSpeciRequst(Reqinfo)
Cross Reference: Use Case: Purchase Ticket By check
Precondition: Sale transaction (ST) is running
Post condition:
ST.handicap , ST.meal was updated according to the customer’s
special requests(attribute modification)
16
Contract CO5
Contract CO5: Complete ReservationOperation: CompleteResv(true)Cross Reference: Use Case: Purchase Ticket By checkPrecondition: Sale transaction (ST) is running, all information recorded .Post condition:•Ticket instance T(s) was created for each passenger in ST (instances creation)•Each T was associated with ST (associations formed)•Each T attributes were initialized (attributes modification)•ST.iscomplete was updated (attributes modification)
17
Contract CO6
Contract CO6: Pay TicketOperation: Paid(amount ,customerID,check id)Cross Reference: Use Case: Purchase Ticket By checkPrecondition: NonePost condition:•Check instance CHK was created (instance creation)•CHK was associated with ST (associations formed)•CHK.amount was initialized to amount (attributes modification)•CHK.id was initialized to checkid (attributes modification)•Customer id C.ID was updated (attributes modification)