You are on page 1of 4

PSEUDO CODE

Main Menu

Input : MenuOption = Get user input to determine menu

FUNCTION main_menu()

Input MenuOption

MenuOption <- MenuOption.upper()

If (menuOption == “P”) then

Purchasing_module()

Elif (menuOption == “V”) then

View_seating_module()

Elif(menuOption == “Q”) then

Exit()

Else main_menu()

Purchasing Menu

Input : PurchasingOption = Get user input to determine ticket class

FUNCTION purchasing_module()

Input PurchasingOption

PurchasingOption <- PurchasingOption.upper()

If (PurchasingOption == “B”) then

Booking_business_seat()

Elif (PurchasingOption == “E”) then

Booking_economy_seat()

Elif(PurchasingOption == “M”) then

Main_menu()

Else purchasing_module()
View Seating Arrangement Menu

Input : seatingOption = Get user input to determine seating category for view seat list

FUNCTION View_seating_module()

Input seatingOption

seatingOption <- seatingOption.upper()

If (seatingOption == “S”) then

View_by_boat_id()

Elif (seatingOption == “T”) then

View_by_trip_time()

Else View_seating_module()

Booking Business Seat

Input : Name = For person’s name that booking business seat

Seat_number = seat number in business class that booked by user

Date = Date for trip

Time = Time for trip

Boat_ID = Boat that booked by user

FUNCTION Booking_business_seat()

Show list available business seat

Input Name, seat_number, date, time, and boat_ID

BookingInformation <- Name, seat_number, date, time, boat_ID

Save booking information to file

Update list available business seat

Print boarding ticket


Booking Economy Seat

Input : Name = For person’s name that booking business seat

Seat_number = seat number in economy class that booked by user

Date = Date for trip

Time = Time for trip

Boat_ID = Boat that booked by user

FUNCTION Booking_economy_seat ()

Show list available economy seat

Input Name, seat_number, date, time, and boat_ID

BookingInformation <- Name, seat_number, date, time, boat_ID

Save booking information to file

Update list available economy seat

Print boarding ticket

View Seating Arrangement by Boat ID

Input : boat_ID = Get user input to view seating arrangement base on boat ID

FUNCTION View_by_boat_id ()

Input boat_ID

Get list seating arrangement from file

If(boat_ID_from_list == boat_ID) then

Print seating arrangement

View Seating Arrangement by Trip Time

Input : trip_time = Get user input to view seating arrangement base on trip time

FUNCTION View_by_trip_time()

Input trip_time

Get list seating arrangement from file


If(trip_time _from_list == trip_time) then

Print seating arrangement

You might also like