Question: For this assignment you will create a set of simple classes that model a cookbook. The cookbook will consist of set or recipes. Each recipe

For this assignment you will create a set of simple classes that model a cookbook. The cookbook will consist of set or recipes. Each recipe will consist of a set of ingredients and instructions. Your submission will consist of the below three classes and a test driver (the only class with a main()) that exercises the functionality of your system.

You will need to implement the following classes based on the description of their attributes and operations:

  • Ingredient
    • name - the name of the ingredient
    • quantity - the amount of the ingredient
    • units - the unit of the quantity (e.g, tablespoon, or T, or Tbl)
    • require the creator to supply the name of the ingredient in order to create one
    • enable the user to retrieve and update each of the attributes appropriately
  • Recipe
    • name - the name of the recipe
    • category - the category of the recipe
    • ingredients - a list of ingredients (you may assume no more than 20)
    • instructions - this would be a paragraph of text, no need to worry about steps
    • require the creator to supply the name of the recipe in order to create one
    • enable the user to retrieve and update each of the attributes appropriately
  • Cookbook
    • name - the name of the cookbook
    • recipes - a list of recipes (you may assume no more than 20)
    • require the creator to supply the name of the cookbook in order to create one
    • enable the user to find recipes by name, returning only those recipes
    • Extra Credit (+1/3 letter grade): enable the user to find recipes by ingredient and return only those recipes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!