VB coding help!

March 29, 2011 at 19:40:41
Specs: Windows 7
Hey guys and gals,

The problem:
Write a program to place an order from the restaurant menu. Write the program so that each group box is invisible and becomes visible only when its corresponding check box is checked. After the button is clicked, the cost of the meal should be calculated.

I hope that makes sense. There are 3 group boxes with check boxes: burgers, fries, and drinks. Each group has various numbers of options and sizes with prices to each. The options are selected by radio buttons. After selecting an option, the price adds to the existing prices to output the total of the complete meal in a textbox.

Thank you for any help. It would be greatly appreciated.

Here is what I have:

Dim sum As Double = 0
If checkBoxburgers.Checked Then
Select Case rBtnReg
sum += 4.19
Case rBtnCheese.Checked
sum += 4.79
Case rBtnBacon.Checked
sum += 4.79
Case rBtnBoth.Checked
sum += 5.39
End Select
End If

If checkBoxfries.Checked Then
Select Case rBtnSmall
sum += 2.39
Case rBtnMedium.Checked
sum += 3.09
Case rBtnLarge.Checked
sum += 4.99
End Select
End If

If checkBoxdrinks.Checked Then
Select Case rBtnSoda.Checked
sum += 1.69
Case rBtnWater.Checked
sum += 1.49
End Select
End If
txtBoxCost.Text = sum

See More: VB coding help!

Report •

March 29, 2011 at 20:45:28
I don't like the invisible group idea. How do you show multiple orders of the same item? add or delete an item? what happens when you get 5 kids ordering? What if I wamt it my way?
Don't reinvent the wheel, You better be faster and more flexible than McDonalds.

Report •
Related Solutions

Ask Question