WRITE A JAVA APPLICATION FOR THE FOLLOWING
A restaurant wants an application that calculates a table's bill.
The design should include:
- Group Boxes,
- ComboBoxes,
- ListBoxes,
- Labels,
- TextBoxes
- PictureBox
- etc.
- Validate the following using try and catch blocks:
- Input format exceptions
- The table number and Waiter's name must be entered. The restaurant has only 10 tables, therefore, the only valid table numbers are 1-10. After the user enters the table number and waiters name, then the table number and the waiters name should appear below the billing information.
- Give your Restaurant a unique name that starts with your name and include a logo or picture image control.
- The application should display all the menu items listedbelowin four ComboBoxes.
- Each ComboBox should contain a category of food offered by the restaurant (Beverage, Appetizer, Main Course and Dessert).
- Keep track of the items ordered by placing each item selected from theComboBoxinto the associatedListBox.
- As each item is selected, add the price of that item to the bill.
- Allow an item to be deselected, i.e. if an item is clicked in theListBoxit should be removed from theListBoxand the price of that item should be subtracted from the bill.
- The user should be able to click theClear BillButton to restore the Subtotal:, Tax:, and Total: fields to $0.00.
Item Price List
Name
|
Category
|
Price
|
Soda
|
Beverage
|
$1.95
|
Tea
|
Beverage
|
$1.50
|
Coffee
|
Beverage
|
$1.25
|
Mineral Water
|
Beverage
|
$2.95
|
Juice
|
Beverage
|
$2.50
|
Milk
|
Beverage
|
1.50
|
Buffalo Wings
|
Appetizer
|
$5.95
|
Buffalo Fingers
|
Appetizer
|
$6.95
|
Potato Skins
|
Appetizer
|
$8.95
|
Nacjos
|
Appetizer
|
$8.95
|
Mushroom Caps
|
Appetizer
|
$10.95
|
Shrimp Cocktail
|
Appetizer
|
$12.95
|
Chips and Salsa
|
Appetizer
|
$6.95
|
Seafood Alfredo
|
Main Course
|
$15.95
|
Chicken Alfredo
|
Main Course
|
$13.95
|
Chicken Picatta
|
Main Course
|
$13.95
|
Turkey Club
|
Main Course
|
$11.95
|
Lobster Pie
|
Main Course
|
$19.95
|
Prime Rib
|
Main Course
|
$20.95
|
Shrimp Scampi
|
Main Course
|
$18.95
|
Turkey Dinner
|
Main Course
|
$13.95
|
Stuffed Chicken
|
Main Course
|
$14.95
|
Apple Pie
|
Desert
|
$5.95
|
Sundae
|
Desert
|
$3.95
|
Carrot Cake
|
Dessert
|
$5.95
|
Mud Pie
|
Dessert
|
$4.95
|
Apple Crisp
|
Dessert
|
$5.95
|