©Vladimir Levin
Vending Machine Application
List of features
The vending machine application will handle purchases of products from a vending machine.
The primary features of this application, described as XP Stories are:
- Configure machine: Enter in a product and a price for each slot, e.g. chips, $1.00 in Slot 1, candy bar,
$2.00 in slot 2, pop $1.50 in slot 3, etc...
- Track inventory: Keep track of the number of items in each slot, e.g. 3 bags of chips in slot 1, etc...
- Purchase item: Allow a user to purchase an item using coins (not bills) and return proper change.
- Validate purchase: Do not allow an item to be purchased if it is unavailable or if the machine
does not have enough change
- Notifcation: If change reserves or inventory fall below pre-defined threshold, or if machine
gets jammed, send message to maintenance crew
- Sales reports: The machine will keep track of sales and has the capability to send back a report
on request.
- Additional Feature Request: Make denominations configurable to handle any arbitrary set of
coins without having to recompile the source code.
- Additional Feature Rquest: Attempt to level change given to prevent a denomination from being
exhausted prematurely
- Additional Feature Request: The machine will present advertising while an item is being delivered
- Additional Feature Request: The machine will support additional methods of payment, such as credit card
or debit.
- Additional Feature Request: The machine will ask the buyer if he wants additional products, e.g. "Would you
like a Pepsi with your Mars bar?"
Note: For your projects, additional feature requests are the kinds of changes
I might ask for later in the development cycle to test the flexibility of your code.
Example Use-Case/Story: Purchase Item
- The buyer puts money into the machine. The machine adds up the amount
with each insertion and and displays it to the buyer.
- The buyer enters in the code for the item he/she wishes to purchase
- The machine validates the code; if the code is invalid, the machine
displays an error message; if the amount is insufficient, the
machine displays an error message.
- The machine dispenses the item.
- If the user presses 'done', the machine returns change; otherwise the
user can enter in a code to purchase another item.
Notes: If you include screen mockups, please concentrate on the functionality, not on appearance or
fancy controls; If you wish to present use case diagrams and packages, you may. If you prefer an
itemized list as the one I've put above, that's fine too. If you would like me to send you some
notes on use case diagrams and packages, let me know (otherwise I will assume you know how they work).
I may ask you to make a use case diagram and/or put use cases into packages
for the first quiz.
Technology
The application will ve written in Java on a Windows platform. For the purpose
of the assignment, the display of items will be mocked up using Swing or command
line text. Reporting/messaging capabilities will be mocked up using sockets.
Issues of security/authentication will not be dealt with for this assignment.