Package com.ccprog3
Interface UI
- All Known Implementing Classes:
CLISingleton
,GUISingleton
public interface UI
UI for user display and input
-
Method Summary
Modifier and TypeMethodDescriptionDisplay for creating a newCoffeeTruck
double
Display to ask user for the quantity ofIngredient
to add to aStorageBin
buyCoffee
(boolean special) Asks the user forCoffee
to buyint
chooseCoffeeTruck
(List<CoffeeTruck> coffeeTrucks) Display for choosing the available Coffee Trucks from the userint
chooseStorageBin
(List<StorageBin> storageBins) Display for choosing the available Storage Bins from theCoffeeTruck
void
coffeeTruckInfo
(CoffeeTruck coffeeTruck, UserSingleton user) Displays info of aCoffeeTruck
void
dashboard
(List<CoffeeTruck> coffeeTrucks) Shows the dashboard summary of the Coffee Trucksvoid
Displays error messagelogin()
Logs the user invoid
makeCoffee
(Map.Entry<Coffee, Money> sale) Shows the process of making aCoffee
boolean
Radio display functionDisplay to ask the user for a new locationAsks the user for new prices to setsetStorageBin
(boolean special) Display to ask the user for a newStorageBin
to replace the selected one
-
Method Details
-
displayErr
-
login
-
addCoffeeTruck
CoffeeTruck addCoffeeTruck()Display for creating a newCoffeeTruck
- Returns:
- The
CoffeeTruck
generated
-
buyCoffee
Asks the user forCoffee
to buy- Parameters:
special
-CoffeeTruck
is special- Returns:
Coffee
to buy
-
makeCoffee
-
coffeeTruckInfo
Displays info of aCoffeeTruck
- Parameters:
coffeeTruck
-CoffeeTruck
to displayuser
- User to show prices
-
chooseCoffeeTruck
Display for choosing the available Coffee Trucks from the user- Parameters:
coffeeTrucks
- List of Coffee Trucks of the user- Returns:
- Index of the chosen
CoffeeTruck
-
chooseStorageBin
Display for choosing the available Storage Bins from theCoffeeTruck
- Parameters:
storageBins
- List of Storage Bins of theCoffeeTruck
- Returns:
- Index of the chosen
StorageBin
-
addStorageBinQuantity
double addStorageBinQuantity()Display to ask user for the quantity ofIngredient
to add to aStorageBin
- Returns:
- Quantity to add
-
setStorageBin
Display to ask the user for a newStorageBin
to replace the selected one- Parameters:
special
-SpecialStorageBin
or regular- Returns:
- The new
StorageBin
to be replace with
-
setCoffeeTruckLocation
-
dashboard
Shows the dashboard summary of the Coffee Trucks- Parameters:
coffeeTrucks
- List of Coffee Trucks
-
setPrices