Question: Need A Flow chart and pseudo code for this < - - - - - Assignment # 6 - Pizza Restaurant Write a C +
Need A Flow chart and pseudo code for this
Assignment #
Pizza Restaurant
Write a
C
program
define a class called Pizza
that has member variabl#include
#include
#include
using namespace std;
Constant variable to represent the type,size and price
const string TYPEStuffCrust "StuffCrust Pizza";
const string TYPEHANDTOSSED "HandTossed Pizza";
const string TYPEPANPIZZA "Original PanPizza";
const string SIZESMALL "Small";
const string SIZEMEDIUM "Medium";
const string SIZELARGE "Large";
const int PRICESMALL ;
const int PRICEMEDIUM ;
const int PRICELARGE ;
const int PRICETOPPINGS ;
class definition
Pizza class
class Pizza
private:
string type;
string size;
vector toppings;
double getBasePrice const functions that return the price for size and topping
double price ;
if getSize SIZESMALL
price PRICESMALL;
else if getSize SIZEMEDIUM
price PRICEMEDIUM;
else if getSize SIZELARGE
price PRICELARGE;
return price;
double getToppingsPrice const
return toppings.size PRICETOPPINGS;
public:
Pizza;
void setTypestring tfunction to set type
type t;
string getType const
if type S
return TYPEStuffCrust;
else if type H
return TYPEHANDTOSSED;
else if type P
return TYPEPANPIZZA;
return ;
void setSizestring sfunction to set size
size s;
string getSize const
if size S
return SIZESMALL;
else if size M
return SIZEMEDIUM;
else if size L
return SIZELARGE;
else
return ;
void addToppingsstring toppingfunction to set toppings
toppings.pushbacktopping;
string getToppingNamestring toppingLetter
string toppingName;
if toppingLetter P
toppingName "Pepperoni";
else if toppingLetter M
toppingName "Mushroom";
else if toppingLetter S
toppingName "Sausage";
else if toppingLetter O
toppingName "Onions";
else if toppingLetter B
toppingName "Bacon";
else if toppingLetter BO
toppingName "Black Olives";
else if toppingLetter H
toppingName "Ham";
else if toppingLetter BP
toppingName "Bell Pappers";
else if toppingLetter GC
toppingName "Grilled Chicken";
else if toppingLetter T
toppingName "Tomatoes";
else if toppingLetter BF
toppingName "Beef";
else if toppingLetter PI
toppingName "Pineapple";
else
toppingName "Unknown";
return toppingName;
void Description const getting pizza type,size,topping
cout "Pizza Type: getType endl;
cout "Pizza Size: getSize endl;
cout "Pizza Toppings: ;
for auto topping : toppings
cout topping ;
cout endl;
cout "Your total amount is $ Price endl; display the toital price
double Price const
return getBasePrice getToppingsPrice;
void PrintReceipt const Display type,size,topping and total ammount for customer
cout Pizza persia endl;
cout PIZZA Type: setw getType setw endl;
cout PIZZA Size: setw getSize setw$ getBasePrice setw endl;
cout Toppings: setw endl;
for auto topping : toppings
cout topping setw$ PRICETOPPINGS setw endl;
cout endl;
cout TOTAL AMOUNT:" setw$ Price setw endl;
cout endl
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
