Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in C++ 1 DESCRIPTION The application should create a recipe based on selection of products, it will display the selections, extracts the total quantity of
in C++
1 DESCRIPTION The application should create a recipe based on selection of products, it will display the selections, extracts the total quantity of the given product from the recipe and adapts the recipe to a different quantity of the same product). A possible execution example is provided further below. Each recipe should compose of a list of ingredients. Recipe should also have a name and it will be characterized by a replication factor (ie number of times the recipe will be prepared - ex: if you prepare a recipe that is designed for 2 people for 4 people, the replication factor should be 2. (keep in mind that a recipe can be prepared one and a half times.). A product can be added to each recipe's ingredient list with its quantity. Recipe should also be adapted. Each ingredient should consist of a product and a quantity to values the product will be initialized with the reference of the argument product, without copying.) Ingredient should have a getter of its product, which must return a constant reference, A product is characterized by it's name and unit of measurement typically used for this kind of product. (Grams, litres or amount.) Each recipe can be cooked (ie, prepared) that will further referred to as "cooked product". A cooked product shall therefore also be characterized by its recipe. At last, you'll have your own cook book. You'll print your recipes or adapted recipes here. You can add recipe, you can adapt your recipe by adding new ingredient. Each class that you will create should have getters and setters. Each class should also have a descriptor (ie, a method that returns a description string 1 For example: a product's descriptor will return the name of the product string) 2 HINTS You'll have : An adapt method that returns a new recipe corresponding to the current recipe replicated by replication factor times. Ex: see the execution below - chocolate frosting and almond chocolate frosting An adapted description method (description of the ingredient adapted to the quantity) that produces a string representation of this ingredient representing the following format: Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started