Package | Description |
---|---|
imm.se.vending.model |
Modifier and Type | Method and Description |
---|---|
Fruit |
VendingMachineController.getDispensedItem()
Returns the fruit that was last dispensed.
|
Fruit |
VendingMachineController.selectedFruit()
Returns the selected fruit.
|
static Fruit |
Fruit.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Fruit[] |
Fruit.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
int |
VendingMachineController.getNumberOfFruit(Fruit fruit)
Returns the number of fruits of type fruit left that can be sold.
|
int |
VendingMachineController.getPrice(Fruit fruit)
Returns the price of a fruit
|
boolean |
VendingMachineController.hasFruit(Fruit fruit) |
void |
VendingMachineController.selectFruit(Fruit fruit)
Selects a fruit that is dispensed by the vending machine given that there is enough
money entered to pay for the fruit and that the fruit is available.
|