Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The burger class has the following private members proteinType protein; condementType condements ( 7 ) ; toppingType toppings [ 7 ] : bunType bun; cheeselype
The burger class has the following private members proteinType protein; condementType condements ; toppingType toppings: bunType bun; cheeselype cheese: int numPatties; bool isVeg: int numCondements; int numToppings:The burger class has the following public functions and constructor Constructor burgerproteinType protein, condementType condements int numCondements, toppingType toppings int numToppings, bunType bun, cheeseType cheese, int numPatties; Getters proteinType getProtein const: std::string getCondements const; stdstring getToppings const; bunType getBun const; cheeseType get Cheese const: bool isVeg const: int getNumPatties const; double get Priced const; Setters void setProteinproteinType; void setCondementscondementTypell int: void setToppingstoppingType int: void setBunbunType;; void setCheesecheeseType; void setNumPattiesint; Other stdustring tostring:A burger will be classified as vegetarian if the burger patty is set to MUSH or VEGGIE, and BACON is not one of the toppings.For the price function, you will follow the following algorithm Use the price per patty found in the enum mapping table above to calculate the price for the protein multiply by the number of patties Add $ for each topping Add $ for each condement Add $ if they have cheeseFor the main program you will create a simple menu program that will allow a user to order a custom burger. The program will let the user choose their protein and number of patties. It will let them specify their bun, cheese, condiments, and toppings. After everything has been chosen the burger will be displayed to the user and they will have the option to make changes. If the customer would make a change that would cause a burger to no longer be classified as vegetarian, they should be warned about the change and forced to confirm that they want to proceed. After the user has finished making changes the final burger will be displayed and the program will exit. This program will be IO tested in CodeGrade. That means that the output of the program must match the sample below exactly to pass the test. Programs with minor differences in the output that cause the tests to fail will be awarded points at the instructor's discretion. PLEASE WRITE THE CODE IN C with the FOLLOWING REQUIREMENTS
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