Tuesday, January 8, 2013

Diner Dash 2: Classes and Methods


procedure customer
young_lady
type_avg=moderately dislike noise
tip_avg=average tipper
patient_avg=moderately patient
speed_avg=moderately speed

family
type_noisy=noisy when unhappy
tip_avg=average tipper
patient_avg=moderately patient
speed_avg=moderately speed

cellphone_addict
type_noisy=very noisy
tip_high=high tipper
patient_low=not patient
speed_high=fast order

jogger
type_noisy=does not mind noise
tip_avg=average tipper
patient_avg=moderately patient
speed_avg=moderately speed

bookworm
type_quite=strongly dislike noise
tip_avg=average tipper
patient_high=very patient
type_low=very slow to order and eat

kindly_senior
type_avg=moderately dislike noise
tip_low=low tipper
patient_high=very patient
type_low=very slow to order and eat

business_woman
type_avg=moderately dislike noise
tip_high=high tipper
patient_low=not patient
              type_high=very fast order and eat




procedure serving
seat (color, sum, type_quite: string)
if color=color_cust
         then seat here
else if sum=sum_cust
         then seat here
else if type_quite
         then do not seat beside the noisy
else seat here

take_order (menu, ticket_station: string)
while menu
do take it and drop to ticket station

serve_food (food_ready, table_number: string)
while food_ready
         do give based on table_number

give_check (finish, check: string)
if customer finish eating
         then give check and pay tip

clear_dish (check, clear: string)
if after pay
         then clear the dish




procedure happy
drink
while serving
         do give drinks

highchair
if baby
         then give highchair

mop
if family spills
         then clean with mop

podium
while customer wait
         do stand on the podium

dessert
if customer ask for dessert
         then give dessert

snack
if customer ask for snack
         then give snack

bench
while customer wait
         do seat them on bench

phone
if need help
         then call for staff’s help

0 comments:

Post a Comment