Hey everyone.
I need to write program that builds an object of Pizza class and then pass that object to Order class.
here's my Pizza class:
class Pizza
{
public:
void setCheeseToppings ( int ) ;
void setPepperoniToppings ( int ) ;
void setSize ( string ) ;
void setType ( string ) ;
private:
int cheeseTop ;
int pepperoniTop ;
string size [ 3 ] = { "small" , "medium" , "large" } ;
string type [ 3 ] = { "hand tossed" , "pan" , "deep dish" } ;
} ;
I know this is a general question, but how should my order.addPizza function look? Do I need to put the same variables that were in pizza into the orders class to store them or do i have access to those variables since the object has been passed?
I'm stuck here:
class Order
{
public:
void addPizza ( Pizza ) ;
void outOrder ( ) ;
private:
} ;