Answered step by step
Verified Expert Solution
Link Copied!

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 C++programs, you should have at least fourThe burger class has the following private members
proteinType protein;
condementType condements[7];
toppingType toppings[7];
bunType bun;
cheeseType cheese;
int numPatties;
bool isVeg;
int numCondements;
int numToppings;
The burger class has the following public functions and constructor
Constructor
burger(proteinType 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 setProtein(proteinType);
void setCondements(condementType[], int);
void setToppings(toppingType[], int);
void setBun(bunType);
void setCheese(cheeseType);
void setNumPatties(int);
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 $0.50 for each topping
Add $0.25 for each condement
Add $0.10 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 C++ file name(s)), Author (your name), Date last updated, and Purpose (a brief description of what the program accomplishes). Here is an example:
??* Program name: jbtictactoe.cpp
* Author: John Doe
* Date last updated:51?2017
* Purpose: Play the game of Tic-Tac-Toe
*
Assignment: Monterey Jack & Jill Burgers
exactly.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions