Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your program will simulate the operation of a vending machine. The machine will dispense, upon reception of the correct amount of money, a choice of

Your program will simulate the operation of a vending machine. The machine will dispense, upon reception of the correct amount of money, a choice of Gum, Peanuts, Cheese Crackers, or M&Ms. Your software will perform the following:

Display a welcome message and instructions.

Set the initial inventory to two (2) of each kind.

Prompt the user for item selection. Gum (G), Peanuts (P), Cheese Crackers (C), or M&Ms (M). Reject any invalid selections.

Confirm the customers selection.

Prompt the user for the amount to enter: Gum ($0.50), Peanuts ($0.55), Cheese Crackers ($0.65), or M&Ms ($1.00).

Accept money inputs of dimes (D), quarters (Q), and one-dollar bills (B).

If the customer selects an out of inventory item, prompt them to make another selection.

Vending machine will shut down if the entire inventory reaches zero.

Assume there is no limit on the amount of change the vending machine contains.

Make provisions for a secret code that when entered will display the current inventory of items.

Sample Processing

Welcome to Mr. Zippys vending machine.

Cost of Gum ($0.50), Peanuts ($0.55), Cheese Crackers ($0.65), or M&Ms ($1.00).

Enter item selection: Gum (G), Peanuts (P), Cheese Crackers (C), or M&Ms (M)

C

You selected Cheese Crackers. Is this correct (Y/N)?

Y

Enter at least 65 cents for selection.

Dimes (D), Quarters (Q) and dollar bills (B):

B

Enough money entered.

Cheese Crackers have been dispensed.

Change of 35 cents has been returned.

Enter item selection: Gum (G), Peanuts (P), Cheese Crackers (C), or M&Ms (M)

General Requirements:

The students ARM Assembly code file needs to contain the following:

Proper header information that include commands that assemble, link, run the file and run the file using the debugger that is specific for their file.

Data section that defines all the output strings.

Code comment sections that describe the major sections of the code:

Welcome message

Cost of items message

Prompt for selection

Verify selection

Prompt for payment until enough is entered

Dispense item, update inventory and given change

Exit program when inventory of all items reaches zero

Go back to step b.

Print inventory when secret code is entered.

I want the full code for this in the arm assembly language. Please provide a full code that fulfills all requirements. Need correct and complete code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

describe the key aspects of facilitating teamwork

Answered: 1 week ago

Question

EXPLAIN the importance of reference checking,

Answered: 1 week ago

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago