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
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