Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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 ex, 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 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M987245

Have any Question?


Related Questions in Computer Engineering

Switches are an integral part of networks they are the

Switches are an integral part of networks. They are the devices you utilize for host connectivity to the network. Please identify and discuss an attack that takes advantage of a weakness in switches.

In relation to internet connectivity both you and the

In relation to Internet connectivity, both you and the chemists at Plains Research are concerned about security. What network device or devices can be used to address the concern about security?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks

Question suppose you want to manage a small project but you

Question : Suppose you want to manage a small project, but you don't have access to project management software. Could you use a spreadsheet or database program instead? How?

Suppose there is exactly one packet switch between a

Suppose there is exactly one packet switch between a sending host and a receiving host. The transmission rates between the sending host and the switch and between the switch and receiving host are R1 and R2 respectively. ...

1 a cpu manufacturing company knows based on the machines

1. A CPU manufacturing company knows, based on the machines working at maximum productivity, that 90% of the CPU's coming off the line meet quality standards. The quality control inspector pulls 25 CPU's off the line to ...

Algorithms assignment -task -1 design and implement an

Algorithms Assignment - TASK - 1. Design and implement an efficient algorithm for determining the best route between two given stations in a given rail network. 2. The rail network should be passed to your program as an ...

Suppose there are n people in a team the coach wants to

Suppose there are n people in a team. The coach wants to know how many different pairs of people he can choose in a team. Write a program in C that shows the coach, the total number of different pairs he can choose in th ...

Suppose you take out a loan for 9000 at 12 ordinary

Suppose you take out a loan for $9,000, at 12% ordinary interest. If the amount of interest is $762.00, what is the time period? (Round any fraction to the next higherday)

Describe an ethical conundrum found in a magazine or

Describe an ethical conundrum found in a magazine or newspaper article, and please give your own thoughts. Give good citations, of course.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As