public class RecipeBook {
private String name;
private Map<String, List<String>> recipes;
public RecipeBook(String name){
this.name = name;
this.recipes = new HashMap<>();
}
// REQUIRES: recipeName is not already in recipes
// MODIFIES: this
// EFFECTS: adds recipeName to recipes, and assigns an empty list of ingredients
public void addNewRecipe(String recipeName){
List<String> ingredients = new ArrayList<>();
//BLANK 1
}
// REQUIRES: recipeName is in recipes
// MODIFIES: this
// EFFECTS: adds ingredient to recipeName's list of ingredients
public void addToRecipe(String recipeName, String ingredient){
List<String> ingredients = recipes.get(recipeName);
//BLANK 2
}
public void printRecipes(){
System.out.println(this.recipes);
}
}