Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions