csci 10 :: programming project 1 (due before midnight on fri, oct 7)

Solve the problem described below by designing, implementing, and testing a HLA console application.

Description:

The purpose of this project is for you to practice and use the HLA/assembly programming skills you learn between the first day of class and the project deadline. These skills include HLA I/O, data types, and control structures, and a variety of assembly arithmetic instructions.

NOTE: You may only use integers in this program, so you will have to design the program to operate on "credits", where 1 credit is equal to one cent US currency (100 "credits" in the program will be the equivalent of 1 US dollar).

Create a simple simulation of a vending machine, with a minimum of five (5) products from which to choose. The simulated vending machine should function as follows:

1. the user is shown a list of products, with inventory counter and credits that each will cost
• each product should have a counter that tracks how many of that product are left in inventory -- each time the user "buys" one of a product, the counter will go down by one
2. the user is prompted for a selection, and an appropriate selection is read -- users must be prevented from selecting "sold out" items
3. the user is prompted to enter credits as payment -- do not let the user proceed until adequate credits have been provided
4. calculate and display the amount of change the customer will receive and "break down" the change to dollars (100 credits), quarters (25 credits), dimes (10 credits), nickels (5 credits), and pennies (1 credit)
• EXAMPLE: The user purchased 33 credits worth of items, and paid 100 credits. The user is due 67 credits of change in the form of 0 dollars, 2 quarters, 1 dime, 1 nickel, and 2 pennies.
5. product stock is then adjusted down per the user's purchase
6. let the user choose to purchase another item or exit the program
• if the user chooses to keep shopping, loop back to the top of the program and show the user the product selections again (inventory counters will NOT be reset)
• if the user chooses to stop shopping, show them a "receipt" that displays:
• quantity of each item purchased and total cost of that item

Objectives:
• employ HLA high-level decisions and repetitions
• begin using HLA assembly-style arithmetic
• explore the x86 general purpose registers
Requirements:
• technical requirements:
• document your HLA source code; use this sample as a guide [50 pts]
• format your program source and output neatly [50 pts]
• your code must compile and run without any problems [50 pts]
• feature requirements:
• a minimum of five (5) products [50 points]
• a dynamic display that shows product names, prices, and inventory count [100 pts]
• proper management of product inventory counters [100 points]
• proper payment handling (ensure user pays adequate credits), and calculation and display of change broken down as dollars, quarters, dimes, nickels, and pennies [200 points]
• complete "receipt" with quantities and prices by item and total cost of all products purchased [150 points]
Total points for this programming project:

750 points