Question: C + + Nutritional information ( classes / constructors ) . Given main ( ) , complete the FoodItems class ( in files FoodItem.h and
C Nutritional information classesconstructors Given main complete the FoodItems class in files FoodItem.h and FoodItem.cpp with constructors to initialize each food item. The default constructor shoukd initialize the name to "Water" and all other class data members to The second constructor should have four parameters food name, grams of fat, grams of carbohydrates, and grams of protein and should assign each class data member with the appropriate parameter value.
Example: If the input is: Water
the output is:
Nutritional information per serving of Water:
Fat: g
Carbohydrates: g
Protein: g
Number of calories for servings:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
