you are writing a system controlling a vending machine that dispenses
You are writing a system controlling a vending machine that dispenses snacks and
soft drinks. There are several types of snacks and soft drinks. You can assume that
you have three types of snacks SnackTypeA, SnackTypeB, and SnackTypeC and each
type has 3 or more items available in the vending machine (i.e. a total of 6 or more
snacks). Each item in a type is identified by a unique name (e.g. "KitKat" may be a
product of type SnackTypeA and "CrispyCream" may be another item in
SnackTypeA also) and each item has a price. The same holds for the soft drinks
where we assume that there are three types of soft drinks DrinkTypeA, DrinkTypeB
and DrinkTypeC. The system, keeps track of a) the items the vending machine has on
its selves, b) the item selected by the customer, b) the amount of money deposited by
a customer, c) whether change or not is required, d) whether insufficient funds are
deposited, and e) whether the user selected an item for which is not available in stock.
When a selection is made and an amount of money is deposited, the machine will
- deliver a product and no change (if exact funds are deposited)
- deliver a product and the appropriate change (if more funds than needed are
- deliver no product due to insufficient funds deposited for a given selection and the
funds are returned to the user (just use a print statement indicating that the funds are
- deliver no product due to the item not being available and the funds are returned to
the user, (just use a print statement indicating that the funds are returned).
*The amount will be in form of wallet points that you can redeem to pay upto 10% of the price for any assignment. **Use of solution provided by us for unfair practice like cheating will result in action from our end which may include permanent termination of the defaulter’s account.Disclaimer:The website contains certain images which are not owned by the company/ website. Such images are used for indicative purposes only and is a third-party content. All credits go to its rightful owner including its copyright owner. It is also clarified that the use of any photograph on the website including the use of any photograph of any educational institute/ university is not intended to suggest any association, relationship, or sponsorship whatsoever between the company and the said educational institute/ university. Any such use is for representative purposes only and all intellectual property rights belong to the respective owners.