Professional Documents
Culture Documents
2 Arrays are properly used to store the descriptions and prices for the
items in each sub-menu
4 “Complete Order” button is set up with a proper event handler which will
summarize the order
2 “Clear Order” erases the order summary (div) and resets all the text
boxes to the default of 1.
2 Total bill (price) is correctly calculated and displayed using the required
format.
1 Good coding style including proper indentation and use of variable and
function naming conventions and suitable comments
15 Total
Problem Description
You’re opening a new restaurant, but your limited budget doesn’t allow you to purchase any point-of-
sale software to automate the order processing and billing. Fortunately, you still have the skills you
learned at Fanshawe College and you decide to use them to write your own web application. The app
will allow each diner to select various items from the menu and then calculate the total amount of the
bill.
Create a single HTML page using the editor of your choice. Name this page using the following
template: your first name followed by an underscore and then RestaurantOrder.html. For example,
Jim_RestaurantOrder.html. The web page should do the following:
1. Display a title
4. You will need to create the user interface using a combination of divs, text boxes and buttons
etc. (see the sample screen captures on the next page). Notice that all text boxes use a
default value of 1.
5. Use 4 divs to display each of the sub-menu items and prices. For each sub-menu, you’ll have
a text box where the user can enter the number of the item selected.
6. When all 4 items have been entered, the user will press the “Complete Order” button and
you’ll use the numbers entered to extract the descriptions and prices from the relevant arrays
to allow you to display a summary of the order along with the total price. Don’t include any
“No selection” values in your summary.
7. The results of the “Complete Order” processing should be output to a div at the bottom of the
page (see sample output).
8. It’s also important that you check the value of each item number entered to ensure that it’s
valid for the particular sub-menu.
9. When you display the total price for all the food ordered, don’t add tax or a tip.
10. All prices and the amount of the final bill should be displayed in standard dollars and cents
format like $9.99 with exactly two decimal places.
11. Finally, you must also include a button labelled “Clear Order” which will erase the current
order and reset all input boxes to the default (1).
Page 3 of 6
Page 4 of 6
Page 5 of 6
How should I submit my project?
Electronic Submission:
Submit your program files to the "optional lab" dropbox in FanshaweOnline. Your
file(s) must be submitted as a single “zip” file. If you complete this lab and
receive a higher grade than your lowest lab mark, it will replace your lowest
lab mark.
Page 6 of 6