#include <iostream>
#include <string>
using namespace std;
class Invoice
{
public:
Invoice( string aNumber, string aDescription, int aQuantity, int aPrice )
{
setpartNumber( aNumber);
setpartDescription( aDescription );
setpurchasedQuantity( aQuantity );
setperPrice( aPrice );
}
void setpartNumber( string aNumber )
{
number = aNumber;
}
string getpartNumber()
{
return number;
}
void setpartDescription( string aDescription )
{
description = aDescription;
}
string getpartDescription()
{
return description;
}
void setpurchasedQuantity( int aQuantity )
{
quantity = aQuantity;
}
int getpurchasedQuantity()
{
return quantity;
}
void setperPrice( int aPrice )
{
price = aPrice;
}
int getperPrice()
{
return price;
}
string coutnumber()
{
cout << number << endl;
return number;
}
string coutdescription()
{
cout << description << endl;
return description;
}
int coutquantity()
{
cout << quantity << endl;
return quantity;
}
int coutprice()
{
cout << price << endl;
return price;
}
void getInvoiceAmount( int value )
{
value = quantity * price;
cout << value << endl;
}
private:
string number;
string description;
int quantity;
int price;
};
int main()
{
string aNumber;
string aDescription;
int aQuantity;
int aPrice;
cin >> aNumber >> aDescription ;
cin >> aQuantity >> aPrice;
if ( aQuantity < 0 )
{
aQuantity = 0;
}
if ( aPrice < 0 )
{
aPrice = 0;
}
Invoice invoice( aNumber, aDescription, aQuantity, aPrice );
invoice.coutnumber();
invoice.coutdescription();
invoice.coutquantity();
invoice.coutprice();
int coutvalue;
coutvalue = 0;
invoice.getInvoiceAmount( coutvalue );
}