Package com.ccprog3.coffee
Class Coffee
java.lang.Object
com.ccprog3.coffee.Coffee
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SpecialCoffee
Class to store Coffee details
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Ingredient
Cup size of theCoffee
protected final CoffeeType
Type ofCoffee
product -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
type
Type ofCoffee
product -
cup
Cup size of theCoffee
-
-
Constructor Details
-
Coffee
Coffee
class constructor- Parameters:
type
- Type ofCoffee
cup
- Cup size- Throws:
IllegalArgumentException
-Ingredient
is not a Cup
-
-
Method Details
-
toString
-
getType
-
getCup
-
getIngredients
Gets the Ingredients required to make theCoffee
without theEspresso
- Returns:
- Map of Ingredients and quantities
-
getEspressoIngredients
Gets the Ingredients required to make theEspresso
- Returns:
- Map of Ingredients and quantities
-
getAllIngredients
Gets the total Ingredients required to make theCoffee
- Returns:
- Map of Ingredients and quantities
-