The documented modules are:
if input(s) from staff are syntactically incorrect then
Report this problem
else
input_ok = true
Attempt to read an invoice with given room number from data store
"Invoices"
if this attempt fails
Report there is no invoice with given room number
else
Attempt to read "fee cost" with given "item number" from data store
"Fees"
if this attempt fails
Report there is no "fee cost" with given "item number"
else
Increase the invoice's "total bill" by the "fee cost"
Send the resulting invoice back to update the data store "Invoices"
if input_ok then
Create an order with time ordered, date ordered, delivery time,
delivery date, comments, item number to be as given in the
input from staff
Attempt to add the resulting order to data store "Room Service"
if attempt fails
Report this problem
end if
Report successful
end if
end if
end if
end if
if input(s) from staff are syntactically incorrect then
Report this problem
else
input_ok = true
Attempt to read an invoice with given room number from data store
"Invoices"
if this attempt fails
Report there is no invoice with given room number
else
Attempt to read "fee cost" with given "item number" from data store
"Fees"
if this attempt fails
Report there is no "fee cost" with given "item number"
else
Decrease the invoice's "total bill" by the "fee cost"
Send the resulting invoice back to update the data store "Invoices"
if input_ok then
Attempt to delete an "order" with given delivery time, delivery
date and item number from data store "Room Service"
if attempt fails
Report there is no order with given delivery time, delivery
date and item number
end if
Report successful
end if
end if
end if
end if
if input(s) from staff are syntactically incorrect then
Report this problem
else
input_ok = true
Attempt to read an invoice with given room number from data store
"Invoices"
if this attempt fails
Report there is no invoice with given room number
else
Attempt to read "order" with given room number from data store
"Room Service"
if attempt fails
Report there is no order with given room number
else
if input_ok then
if staff input included delivery time then
Replace the order's delivery time with the one given in
input
end if
if staff input included delivery date then
Replace the order's delivery date with the one given in
input
end if
if staff input included number of items then
Replace the order's number of items with the one given in
input
end if
if staff input included comments then
Replace the order's comments with the one given in input
end if
end if
end if
Report successful
end if
end if
if input(s) from staff are syntactically incorrect then
Report this problem
else
input_ok = true
Attempt to read an invoice with given room number from data store
"Invoices"
if this attempt fails
Report there is no invoice with given room number
else
Attempt to read "order" with given room number from data store
"Room Service"
if attempt fails
Report there is no order with given room number
else
?????
end if
Report successful
end if
end if
if input(s) from staff are syntactically incorrect then
Report this problem
else
input_ok = true
Attempt to read an invoice with given room number from data store
"Invoices"
if this attempt fails
Report there is no invoice with given room number
else
Report the resulting "invoice" to the staff
Report successful
end if
end if
if input(s) from staff are syntactically incorrect then
Report this problem
else
input_ok = true
Attempt to read an order with given room number from data store
"Room Service"
if this attempt fails
Report there is no order with given room number
else
Report the resulting "order" to the staff
Report successful
end if
end if
