public class CashDispenser
extends java.lang.Object
| Constructor and Description |
|---|
CashDispenser()
Initializes the count of $20 bills to the default value for the day
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispenseCash(int amount)
Simulates the dispensing of the specified amount of cash.
|
boolean |
isSufficientCashAvailable(int amount)
Indicates whether cash dispenser can dispense desired amount of cash
|
public CashDispenser()
public void dispenseCash(int amount)
amount - the amount of cash requiredpublic boolean isSufficientCashAvailable(int amount)
amount - the amount of cash required