July 27th, 2011, 09:46 AM
A restaurant wants an application that calculates a table's bill. The application should display all the menu items ( shown below) in four ComboBoxes. Each ComboBox should contain a category of food offered by the restaurant (Beverage, Appetizer, Main Course and Dessert). The user can choose from one of these ComboBoxes to add an item to a table's bill. As each item is selected in the ComboBoxes, add the price of that item to the bill. The user can click the Clear Button to restore the Subtotal:, Tax:, and Total: fields to $0.00
I am having trouble with calculating the subtotal, tax, and total bill. I created a calculate button, and would like it to calculate these things when clicked. This is the code I used for that section:
private void Calculate_Click(object sender, EventArgs e)
double SubAmt = BevPrice + AppPrice + MainPrice + DesPrice;
double TaxAmt = SubAmt * 0.07;
double TotalAmt = SubAmt + TaxAmt;
There are no errors, but I have spent days on this problem and can't figure out what else I need to do.
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!