Question: C programming Programming Assignment 3: Vending Machine Purpose The main purpose of this programming assignment is to revise functions, pointers, pass by value vs. pass

 C programming Programming Assignment 3: Vending Machine Purpose The main purpose

of this programming assignment is to revise functions, pointers, pass by value

vs. pass by reference, arrays Description In this programming assignment, you will

C programming

Programming Assignment 3: Vending Machine Purpose The main purpose of this programming assignment is to revise functions, pointers, pass by value vs. pass by reference, arrays Description In this programming assignment, you will be implementing a program that simulatesa vending machine, i.e. the sale of items, coin counting and change giving This vending machine will work as follows. A customer will first deposit an initial amount of money and then select an item from the vending machine. Your program must check that the customer makes a valid selection. If it is a valid selection, then the price of selected item will be deducted from the initial deposit and also the number of items in your vending machine will be updated accordingly. Once the customer has finished his/her selection, then your vending machine calculates the denominations of coins that are to be returned to the customer as change. Assume that only 1 TL, 0.5 TL, 0.20 TL, 0.10 TL and 0.05 TL coins are available for making change. With this vending machine, assume that the customer can select only one item at a time There are 10 of each item at the beginning of each day. If a customer selects an item that is no longer available, then the machine starts when it is switched on and only stops when power is shut off vending machine will display an error message. Your vending In this vending machine, the following selections are on offer: 1. Water 2. Coke 3. Diet Coke 4. Iced Tea 5. Swiss Chocolate 6. Candy 7. Chips 8. Bubble Gum 9. Turkish Delight 1.00 TL 1.20 TL 1.20 TL 1.00 TL 1.50 TL 0.95 TL 2.50 TL 1.50 TL 2.00 TL Programming Requirements 1. You ustimplement unctions ShowMenuMakeSelection ), Maintenance ), ReturnChange,and DisplayErrorMessage) with the appropriate parameters. These functions need to function as follows: ShowMenu () function will display the offered selections as given above Programming Assignment 3: Vending Machine Purpose The main purpose of this programming assignment is to revise functions, pointers, pass by value vs. pass by reference, arrays Description In this programming assignment, you will be implementing a program that simulatesa vending machine, i.e. the sale of items, coin counting and change giving This vending machine will work as follows. A customer will first deposit an initial amount of money and then select an item from the vending machine. Your program must check that the customer makes a valid selection. If it is a valid selection, then the price of selected item will be deducted from the initial deposit and also the number of items in your vending machine will be updated accordingly. Once the customer has finished his/her selection, then your vending machine calculates the denominations of coins that are to be returned to the customer as change. Assume that only 1 TL, 0.5 TL, 0.20 TL, 0.10 TL and 0.05 TL coins are available for making change. With this vending machine, assume that the customer can select only one item at a time There are 10 of each item at the beginning of each day. If a customer selects an item that is no longer available, then the machine starts when it is switched on and only stops when power is shut off vending machine will display an error message. Your vending In this vending machine, the following selections are on offer: 1. Water 2. Coke 3. Diet Coke 4. Iced Tea 5. Swiss Chocolate 6. Candy 7. Chips 8. Bubble Gum 9. Turkish Delight 1.00 TL 1.20 TL 1.20 TL 1.00 TL 1.50 TL 0.95 TL 2.50 TL 1.50 TL 2.00 TL Programming Requirements 1. You ustimplement unctions ShowMenuMakeSelection ), Maintenance ), ReturnChange,and DisplayErrorMessage) with the appropriate parameters. These functions need to function as follows: ShowMenu () function will display the offered selections as given above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!