Quiz 3 Solution
Quiz 3 Solution
Faculty of Computing
Quiz
class customer
{
private:
string name;
string location;
public:
customer();
customer(string,string);
void setName(string);
string getName();
void setLocation(string);
string getLocation();
void sendOrder();
void receiveOrder();
};
class order
{
private:
string number;
string date;
public:
order();
order(string, string);
void setNumber(string);
string getNumber();
void setDate(string);
string getDate();
void confirm();
void close();
};
Source File:
using namespace std;
customer::customer()
{
this->name = "";
this->location = "";
}
customer::customer(string name, string location)
{
this->name = name;
this->location = location;
}
void customer::sendOrder()
{
//you have to write code for send Order
}
void customer::receiveOrder()
{
//you have to write code for receive Order
}
order::order()
{
//same like customer constructor without aurgument
}
order::order(string number, string date)
{
//same like customer constructor with aurgument
}
void order::confirm()
{
// confirm order code;
}
void order::close()
{
//close order code;
}
normalOrder::normalOrder()
{
//same like customer constructor without aurgument
}
normalOrder::normalOrder(string number, string date)
{
//same like customer constructor with aurgument
}
void normalOrder::dispatch()
{
// confirm dispatch code;
}
void normalOrder::receive()
{
//close receive code;
}
specialOrder::specialOrder()
{
//same like customer constructor without aurgument
}
specialOrder::specialOrder(string number, string date)
{
//same like customer constructor with aurgument
}
Main File:
using namespace std;
int main()
{
customer c;
normalOrder no;
specialOrder sp;