|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectDisplayScreen
public class DisplayScreen
Represents the display screen and touch pad of a vending machine Also represents the controller of the program
| Constructor Summary | |
|---|---|
DisplayScreen()
Constructs a new DisplayScreen object |
|
| Method Summary | |
|---|---|
void |
displayOperatorOptions()
Displays the options available for any Operator of the VendingMachine |
void |
displayProducts()
Displays the Products in the VendingMachine to the user |
void |
displayWelcome()
Displays the first screen to be seen by a user of this VendingMachine. |
int |
getOperatorChoice()
Returns the Operator's choice (0 = "exit", 1 = "restock a product", 2 = "remove money") |
void |
operatorFailureToLogIn()
Displays an error when someone fails to log in as a Operator, then restarts from the welcome screen |
boolean |
operatorLogin()
Walks the Operator through the login process |
void |
operatorRemovesMoney()
Removes all the coins from this VendingMachine object and reports number of coins removed to the Operator |
void |
operatorRestocksProduct()
Allows an Operator to restock a particular Product |
void |
run()
Runs the Vending Machine program |
void |
userPaysForProduct(int productIndexPlusOne)
Allows the user to pay for a already-selected Product |
int |
userSelectsProduct()
Allows the user to select a Product to purchase |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DisplayScreen()
| Method Detail |
|---|
public void displayWelcome()
public boolean operatorLogin()
public void operatorFailureToLogIn()
public void displayOperatorOptions()
public int getOperatorChoice()
public void operatorRestocksProduct()
public void operatorRemovesMoney()
public void displayProducts()
public int userSelectsProduct()
public void userPaysForProduct(int productIndexPlusOne)
productIndexPlusOne - the selected Product codepublic void run()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||