Create the IPO and pseudocode algorithm for the following problem. Consider the problem of a vending machine. The vending machine must accept a user choice for an item in the vending machine, accept...


Create the IPO and pseudocode algorithm for the following problem.


Consider the problem of a vending machine. The vending machine must accept a user choice for an item in the vending machine, accept money from the user, and then dispense the selected item and appropriate change. You may use the following assumptions.


The user will always give at least enough money to pay for the item. (They may give more than enough.)


The user will input a number to select an item from a menu that the program displays to the user.


The program will use a module to return the price of the item. The module will work as follows:


itemCost = getItemCost(itemNumber) (where itemNumber is the menu number entered in by the user.)


The program will dispense, as change the least number of coins. (Hint: This can be calculated by finding the largest coin values first and then subtracting that value from the total change, and then proceeding to the next largest coin value, until you have gone through all of the coin denominations.


The coin values you will use are:


100 Cent (Dollar)


50 Cent (Half Dollar)


25 Cent (Quarter)


10 Cent (Dime)


5 Cent (Nickel)


1 Cent (Penney)


When your program runs it should look something like the following:


Welcome to my vending machine.


You may choose from the following items:


1) M and Ms for 53 Cents


2) Potato Chips for 67 Cents


3) Milky Way for 89 Cents


4) Fruit Cup for 136 Cents


Please select an item by entering in it's number.


3


You chose item number 3 for 89 Cents


Please enter at least 89 Cents


247


Your entered 247 Cents


Your change is 158 Cents


That is:


1 Dollar(s)


1 Half Dollar(s)


0 Quarter(s)


0 Dime(s)


1 Nickel(s)


3 Penney(s)


You do not need any selection code to project, it can be done with purely simple sequence.



thank you


I do not need python programme for this assignment i just need ipo and pseudocode


thank you




May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here