Question: So i'm working on a c++ program that involves structs. So the values for the coffee name are enumerated as 1=light, 2=medium, 3=dark. Then add
So i'm working on a c++ program that involves structs. So the values for the coffee name are enumerated as 1=light, 2=medium, 3=dark. Then add to the struct an attribute for coffee size that will be enumerated as small=0, regular=1, medium=2, large=3, extra-large =4. The cost is calculated as follows small $1.50, , regular $2.10, medium $2.50, large $3, extra-large $4.25. Add .25 if they choose French roast or Italian blend, add .13 for each level of sugar, and add .08 for cream. Here the code I'm modifying.
struct coffee { string name; float price; int strength; int sugar; bool creamer = false; };
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
