Package com.ccprog3.coffee
Class SpecialCoffee
java.lang.Object
com.ccprog3.coffee.Coffee
com.ccprog3.coffee.SpecialCoffee
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CustomSpecialCoffee
Special Coffee from
SpecialCoffeeTruck
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSpecialCoffee
(CoffeeType type, Ingredient cup, Espresso espresso, SyrupIngredient[] syrups, Espresso[] shots) SpecialCoffee
constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the total Ingredients required to make theCoffee
Gets theEspresso
brewGets the Ingredients required to make theEspresso
Gets the Ingredients required to make the extra shotsgetShots()
Gets the List of extra shotsGets the Ingredients required to make the SyrupGets the List of Syrup addonstoString()
Methods inherited from class com.ccprog3.coffee.Coffee
getCup, getIngredients, getType
-
Constructor Details
-
SpecialCoffee
public SpecialCoffee(CoffeeType type, Ingredient cup, Espresso espresso, SyrupIngredient[] syrups, Espresso[] shots) throws IllegalArgumentException SpecialCoffee
constructor- Parameters:
type
- Type ofCoffee
cup
- Cup sizeespresso
-Espresso
brewsyrups
- Syrup addonsshots
- Extra shots- Throws:
IllegalArgumentException
-Ingredient
is not a Cup; Syrup cannot be NONE; Shot cannot be CUSTOM
-
-
Method Details
-
getEspresso
-
getSyrups
Gets the List of Syrup addons- Returns:
- The List of Syrup addons
-
getShots
-
toString
-
getEspressoIngredients
Description copied from class:Coffee
Gets the Ingredients required to make theEspresso
- Overrides:
getEspressoIngredients
in classCoffee
- Returns:
- Map of Ingredients and quantities
-
getSyrupIngredients
Gets the Ingredients required to make the Syrup- Returns:
- Map of Syrup Ingredients and quantities
-
getShotIngredients
Gets the Ingredients required to make the extra shots- Returns:
- Map of Ingredients and quantities
-
getAllIngredients
Description copied from class:Coffee
Gets the total Ingredients required to make theCoffee
- Overrides:
getAllIngredients
in classCoffee
- Returns:
- Map of Ingredients and quantities
-