McDonalds program using c# 2008

This is a discussion on McDonalds program using c# 2008 within the C# Programming forums, part of the General Programming Boards category; Alright so I am having trouble programming this it's suppose calculate the total bill along with the amount tendered and ...

McDonalds program using c# 2008

Alright so I am having trouble programming this it's suppose calculate the total bill along with the amount tendered and change due. It is suppose to be done using methods here are the items along with their prices:

Small French fries = 1.00;
Medium French fries = 1.79;
Large French fries = 2.09;

Drinks

Small = 1.29;
Medium = 1.59;
Large = 1.89;

Salads

Caesar = 4.49;
Garden = 4.49;
House = 4.49;

Each heading is in it's own group box I used check boxes for each item and numeric up down scrollbar to select the quantity. I need to program it so that after you select all your food in prints a receipt on another form with total amount tendered and change.

Sorry if i posted the code wrong I am kinda knew to this anyway the letter variables represent each item's price as well as quantity. I'm not sure how to proceed and I'm pretty sure I'm not using methods either I'ts not from lack of effort though I have been watching video's but I still don't understand how to use them.

I'm not sure how to proceed now though heres what i have the variables before the methods are underlined in green. How do I make it so it recognizes the two variables as Item price and Item quantity? I really appreciate the help.

Sorry what's your email maybe if i email you the program it might be easier for you to see what i have to do. I obviously don't want you to do it for me but if you can give me hints i should be able to finish it.

Alright so I pretty much have it working except like I said I'm using checked boxes for items and numeric up/down scroll bars for quantity. I know the example you showed me you put numbers in for hamburgers ordered and how much cash was given but i'm suppose to make it so you can order any amount of any item and the cash given is random. So I put 0 in for all my quantity variables along with money given now though every time i click calculate everything is equal to zero...

This assumes that numericUpDown1 is the control used for deciding the quantities of hamburgers you want.

I'm not sure what the purposes of the CheckBoxes are. Are you saying there is 1 CheckBox per item? If so, then this could be used to decide whether to add the calculation for that item to the running total. Again, assuming they are default variable names, use the Checked property, eg: