User Manual 1.5
User Manual 1.5
Table of Contents
Introduction ............................................................................................................................................ 3
Getting Started........................................................................................................................................ 3
Adding/Removing Products ................................................................................................................ 4
Adding/Removing Money ................................................................................................................... 5
Viewing Sales Record .......................................................................................................................... 6
Buying Products ...................................................................................................................................... 7
Selecting Products & Making Payment ............................................................................................... 7
Special Cases ................................................................................................................................... 9
Collecting Product(s) And Change ...................................................................................................... 9
Machine Auto-Updates ......................................................................................................................... 10
Closing And Auto-Saving ....................................................................................................................... 10
Special Cases ..................................................................................................................................... 10
Resuming A Machine State ................................................................................................................... 10
Special Cases ..................................................................................................................................... 11
Creating A Custom Machine ................................................................................................................. 12
Creating New Settings Without Loading Vending Machine.............................................................. 14
Topping-Up/Changing Value Of Cards For Existing Machine................................................................ 16
Setting/Changing A Password For Existing Machine ............................................................................ 16
Removing Password From Machine ................................................................................................. 16
Page | 2
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Introduction
This software aims to be a simulation of a vending machine. It features the ability to create your own
vending machine with the properties (number of shelves, etc.) you desire. In addition, you can do
the following:
Getting Started
The very first time you start up the application, you will get the following prompt:
If you select “Yes”, the vending machine will start with the default settings, and you will see the
following screen:
Notice that majority of the buttons are not enabled. This is because you currently have no products.
Page | 3
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Adding/Removing Products
To add a product, click on the “Product Administrator Mode” button you see on the bottom right.
You will then be presented with the following screen:
You may start typing in the product name, as well as set the quantity and price for the product. It is
not possible to add a new row of product as this models a real vending machine. However, it is
possible to leave the product name blank, as well as the price as $0.00. As long as the product is not
out of stock, it will be available for purchasing. Also, you may leave any number of shelves blank.
To remove a product, simply set its quantity to 0 and price to 0, and leave the product name blank.
Once done, you may either click on “User Mode” to buy products, or “Register Administrator Mode”
to see how much money is currently in the machine.
Page | 4
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Adding/Removing Money
To see, as well as to change, the amount of money currently inside the machine, click on “Register
Administrator Mode” at the bottom right of the application. Once done, you will be presented with
the following:
The types of coins and notes (values) cannot be changed (once a vending machine) has been
created. However, you can change the quantity of each type. The total amount for each value and
the overall total amount that is seen will be updated as you add or remove money. Once done, you
may click on any of the operation modes to continue.
Page | 5
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
You may then print your sales record to paper, or reset the sales record. The above sales record is
blank as nothing has been purchased yet.
Page | 6
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Buying Products
You might notice that once you insert a card, the rest of the cards are disabled. To insert another
card, please first remove the existing card. Also, after each successful purchase using a card, the
value of the card will be reflected and updated.
If you have sufficient cash or card value, you will get the following:
Page | 7
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
If you have insufficient cash or card value, the one that is insufficient will be highlighted in red, and
attempting to purchase it will result in an error message, as shown below:
Once you are done with your selection, simply make your choice whether to “Pay By Cash” or “Pay
By Card”. Assuming that we select “Pay By Cash” after inserting $80, we will get the following:
Upon clicking “Ok”, you may proceed to purchase more items, or to collect your change and items.
Page | 8
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Special Cases
Assuming that the machine is unable to return any change, either due to not having enough change,
or due to the fact that there is no such coin type available, you will get the following:
In the above example, we have chosen to buy 1 Viceroy Methol Lights, which costs $11.85. However,
the register for the vending machine does know know, or have any $0.05 change. Thus, you will get
the “Insufficient Change Available”. In such a case, you may opt to pay by card instead.
Page | 9
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Machine Auto-Updates
After each successful purchase, the amount of each value of money will be auto-updated to reflect
the changes. Also, the quantity of each product will be updated, as well as the sales record. The
following is a screenshot of the “Sales Record” after the previous purchase:
Special Cases
You might get the above error when attempting to close the vending machine. In such a case, please
remove your card, and try again. The machine should now close successfully.
Page | 10
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Special Cases
You may get either one of the following, when attempting to resume a machine:
Both cases are exceptions that happen should one of the 2 settings file get deleted. Clicking on “No”
will allow you to create a custom vending machine, which is detailed in the next section.
Important: Selecting “No” for any of the above, and proceeding to load the new vending machine
will result in deletion of the previous state.
Page | 11
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
There are many ways to do so. The simplest way is as follows. When starting the application, you will
get one of the following prompts, depending on whether you have a saved state or not already:
Selecting “No” for any of them will present you with the following Settings Editor. By default, it will
fill up with the settings from your previous machine state:
Important: Selecting “No” for any of the above, and proceeding to load the new vending machine
will result in deletion of the previous state.
Page | 12
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
You may then enter the values as you like. You may also set a machine password for the new
vending machine. However, the application is limited to 5 types of coins, 5 types of notes, and 5
shelves at most. To change the card values, click the arrow at the top-right corner, and you should
get the following:
Once you are done, click on “Load Vending Machine” to load your newly created vending machine.
You may also “Save Settings” should you choose to. Upon clicking on “Load Vending Machine”, you
will see your new vending machine. The screenshot below is an example:
Page | 13
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
You may then proceed to add products and use your vending machine as detailed in the “Getting
Started” section.
Note: For a new vending machine to be created in this manner, “VMState.dat” must first be
deleted.
From command prompt, navigate to the directory containing the vending machine application. Then
type one of the following:
Where “VendingMachine.jar” is the application name. If you have renamed it, please change the
command accordingly. Once done, you will get the following. You may then proceed to “Save
Settings” and exit the application. The next time you decide to run the vending machine, it will be
created with the new settings.
Page | 14
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Page | 15
User Manual
CS2103 Software Engineering Project – Vending Machine
Team 5
Note: For the cards to be updated without the creation of a new vending machine, “VMState.dat”
MUST NOT be deleted, unlike the previous section.
To start it, go to command prompt and navigate to directory containing the application. Once done,
do the following:
Where “VendingMachine.jar” is the application name. If you have renamed it, please change the
command accordingly. You will be able to change the values of the cards as well as rename them
from here. Once done, you may proceed to “Save Settings” and launch your vending machine. Take
note that as long as “VMState.dat” is not deleted, the vending machine will not be affected except
for the updated card values.
Key in a password of your choice, and click “Save Password”. From now on, whenever you change
from “User Mode” to any other mode, a password would be required.
You will have to key in your old password in order to change to the new one.
Page | 16