computers

posted by .

The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required to maintain the product inventory and money reservoir. The program should do the following operations:

1. Take as input an item number and money (The program terminates when a user enters a negative money amount and “000” as an item number.)

2. Check to see if the item exists. (if it doesn’t give the user a chance to re-enter the number)

3. Check to see if the money is sufficient enough to pay for item. (If not request more money)

4. Check to see if item is in stock. (If not user should be notified with the choice of selecting new item or cancelling the order)

5. If the item is in stock and the money is sufficient, the program should provide change and update the money reservoir and product inventory.

6. When the dispensing change, the program must insure that it always returns the correct amount of change based on the coins available in the reservoir. For example, if a user is owed $0.30 then the program may return 1 quarter and 1 nickel. However, if there are no quarters, the program should be smart enough to return a different combination of that doesn’t include quarters. (If no combination of change exists, the user’s order should be cancelled and the user should be allowed to make an alternate selection)

7. Once a transaction is complete, the user should be prompted to make a new selection. The program will end when a user enters a negative money amount and “000” for the item number.

Product Inventory:

Below is a breakdown of the products offered by the vending machine. In addition to the product names, the prices, item number and quantities are also listed below. The user will use the item number to select the product they wish to purchase.

Product Name Item Number Price Quantity in Stock

Candy Bar 123 $0.60 60

Gum 124 $0.35 75

Potato Chips 125 $0.75 40

Trail Mix 126 $.050 50

Breakfast Bar 127 $0.80 45

  • Programming -

    ... but don't expect someone here to do your entire assignment for you. =(

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. macroeconomics

    what economic concept explains why news vending machines allow a consumer access to entire inventory of newspapers, yet soft drink vending machines dispense only one drink at time?
  2. marketing

    : You are working in the product development department of a company that creates household products. Your team has come up with an idea for a revolutionary new cleaning product. Using the seven phases of new product development as …
  3. operations management

    A company requires 5,000 units of a product in a single year. It costs them $100 per order for expenses such as transportation and communication. If the product is carried in inventory, the carrying cost equals 1% of the price of the …
  4. marketing

    You are working in the product development department of a company that creates household products. Your team has come up with an idea for a revolutionary new cleaning product. Using the seven phases of new product development as a …
  5. MATH

    A company makes three products X, Y and Z. Each product requires processing by three machines A, B and C. The time required to produce one unit of each product is shown below. Product X:- Machine A: 1 Machine B: 2 Machine C: 2 Product …
  6. MATH- please help!

    A company makes three products X, Y and Z. Each product requires processing by three machines A, B and C. The time required to produce one unit of each product is shown below. Product X:- Machine A: 1 Machine B: 2 Machine C: 2 Product …
  7. math- im really confused! please help!!

    A company makes three products X, Y and Z. Each product requires processing by three machines A, B and C. The time required to produce one unit of each product is shown below. Product X:- Machine A: 1 Machine B: 2 Machine C: 2 Product …
  8. MATH-PLEASE HELPPP!!!!

    A company makes three products X, Y and Z. Each product requires processing by three machines A, B and C. The time required to produce one unit of each product is shown below. Product X:- Machine A: 1 Machine B: 2 Machine C: 2 Product …
  9. programming

    Develop psuedocode to control operation of vending machine The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required …
  10. fundamentals of programming

    The ACME Company has approached you with a request to develop the psuedocode that will control the operations of their new series of vending machines. The program will be required to maintain the product inventory and money reservoir. …

More Similar Questions