Professional Documents
Culture Documents
string part_number;
string part_description;
int Quantity;
int price;
public:
Invoice():part_number(0),part_description(0),Quantity(0),price(0)
{ }
Invoice(string part_number, string part_description ,int Quantity ,int price);
string getpart_number();
string getpart_description();
int getQuantity();
int getprice();
string setpart_description(string);
string setpart_number(string);
int setQuantity(int);
int setprice(int);
int getInvoiceamount();
void setinvoice(string,string,int,int);
};
//Default constructor
//argument constructor
//Invoice::Invoice(string part_number, string part_description ,int Quantity ,int
price)
//{
/*part_description(string );
part_number(string);
setQuantity(int);
setprice(int);*/
//setInvoice(part_number,part_description,Quantity,price);
//}
string Invoice::setpart_number(string p_n)
{
part_number=p_n;
}
string Invoice::getpart_number()
{
return part_number;
}
string Invoice::setpart_description(string p_d)
{
part_description=p_d;
}
string Invoice::getpart_description()
{
return part_description;
}
int Invoice::getQuantity()
{
return Quantity;
}
int Invoice:: setprice(int p)// set the function
{
price=p;
}
int Invoice::getprice()
{
return price;
}
int Invoice:: getInvoiceamount()
{
// multiplies the quantity by the price per
//item and applies the text and discount amounts
return getQuantity()*getprice();
int main()
{
Invoice t1;
return 0;
}
//=================================================================================
============================================