Question: C + + Need cpp and hpp file All function arguments should be references in this project, unless specifiec otherwise. You should follow all aforementioned
C Need cpp and hpp file
All function arguments should be references in this project, unless specifiec otherwise.
You should follow all aforementioned programming conventions and best practices.
LO NOT USE NAMESPACE STD You are responsible for any points you lose by doing
If the return type of a function or the type of a parameter isn't specified, you're expected to
be able to deduce what it should be based on the private member variables of the class
In this project. you are nct being asked to create display functions for the subclasses.
The Dessert class is a subclass of Dish that represents a dessert dish.
The Dessert class must define the following types INSIDE the class definition:
Flavor Profile enum: Describes the dominant flavor of the dessert.
Enum: FlavorPrcfile SWEET, BItTER, SOJR, SALTY, UMAMI
The Dessert class must have the following private member variables:
FlavorPrcfile flavorprofile: The flavor profile of the dessert.
int sweetnesslevel: An integer representing the sweetness level of the desserl o getFlavorProfile:
bool containsnuts: A flag indicating if the dessert contains nuls.
The Dessert class must have the following public member functions:
Initializes all private nembers with default values.
Instantiate a dessert with the parameterized constructor:
Name: "Chocolate Cake"
Ingredients: Flour "Sugar", "Cocoa Powder", "Eggs'
Preparation Time:
Price:
Cuisine Type: FRENCH
Flavor Profile SWEET
Sweetness Level:
Set the containsnuts flag to false using the appropriate setter function
Print out the dessert's information using the accessor functions.
Expected Output:
Cish Nams: Chocolate Cake
Ingredients: Flour, Sugar, Cocoa Powder, Egcs
Freparation Time: minutes
Frice: $
Cuisine Type: FREMCH
Flavor Profile: SWEET
Sweetness Level:
Contains Nuts: False
greturn The flavor profile of the dessert as an enum
Sets the flavor profile of the desset. setContainsNuts:
aparam flavdrorofile the new flavor profile.
apost Sets tre private member "flavoprofile to tee value of the
paraneter.
setFlavorProfile
getflavorProfile
Sets the containsnuts flag of the desser..
@oaram containsnts A boolean indica:ing i the dessert contains
uts
@oost Sets the private nember containsnuts to the value of the
parameter.
setContainsNts
containsNuts:
@return True if the dessert contains nuts, "alse otherwise.
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
