develop a domain model for a vending machine as described below.
The vending machine has a display, an alphanumeric keypad, a coin insertion slot, and an item dispenser. The display shows the vending items like chocolates, candies, potato chips, Coke, sprite, etc. Each type of item has a price and a label consisting of a letter A, B, C, ... and a digit 1, 2, ... A customer inserts coins through the coin slot. Each time a coin is inserted an LCD displays the total amount. The customer can press a letter and a digit to enter his selection after enough coins have been inserted. If the total amount is greater than or equals to the item selected, the vending machine dispenses the item and returns the change to the customer. A customer can change his mind and request that the coins be returned by pressing the return button.
Get Free Quote!
316 Experts Online