Answered step by step
Verified Expert Solution
Question
1 Approved Answer
At the top of each of your C + + programs, you should have at least fourThe burger class has the following private members proteinType
At the top of each of your programs, you should have at least fourThe burger class has the following private members
proteinType protein;
condementType condements;
toppingType toppings;
bunType bun;
cheeseType 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;
std::string getToppings const;
bunType getBun const;
cheeseType getCheese const;
bool isVeg const;
int getNumPatties const;
double getPrice const;
Setters
void setProteinproteinType;
void setCondementscondementType int;
void setToppingstoppingType int;
void setBunbunType;
void setCheesecheeseType;
void setNumPattiesint;
Other
std::string 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 cheese
For 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. lines of documentation:
Program name the file names Author your name Date last updated, and Purpose a brief description of what the program accomplishes Here is an example:
Program name: jbtictactoe.
Author: John Doe
Date last updated:
Purpose: Play the game TicTacToe
Assignment: Monterey Jack & Jill Burgers
exactly.
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