#include<iostream>
#include<string>
using namespace std;
class Date
{
int day;
int month;
int year;
public :
Date ( int Day= 1 , int Month= 1 , int Year= 1970 )
{
day = Day;
month = Month;
year = Year;
}
int getDay( ) { return day; }
int getMonth( ) { return month; }
int getYear( ) { return year; }
} ;
/*InventoryItem containing Name, Cost, Quantity, DatePurchased(Object of the date Class), InventoryTotal(Static Variable)*/
class InventoryItem
{
string Name;
double Cost;
int Quantity;
Date DatePurchased;
static int InventoryTotal;
public :
InventoryItem ( string strName, double dCost, int nQuantity, Date cDatePurchased( int , int , int ) , int s_nInventoryTotal)
{
Name = strName;
Cost = dCost;
Quantity = nQuantity;
DatePurchased = cDatePurchased( 10 ,10 ,2010 ) ;
InventoryTotal = s_nInventoryTotal;
}
string getName( ) { return Name; }
double getCost( ) { return Cost; }
int getQuantity( ) { return Quantity; }
Date getDatePurchased( ) { return DatePurchased( ) ; }
int getInventoryTotal( ) { return InventoryTotal; }
} ;
int main ( )
{
//InventoryItem.cDatePurchased(10,10,2010);
cout << InventoryItem.getDatePurchased ( ) ;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPHN0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIERhdGUKewogICAgaW50IGRheTsKICAgIGludCBtb250aDsKICAgIGludCB5ZWFyOwogIHB1YmxpYzoKICAgIERhdGUgKGludCBEYXk9MSwgaW50IE1vbnRoPTEsIGludCBZZWFyPTE5NzApCiAgICB7CiAgICAgIGRheSA9IERheTsKICAgICAgbW9udGggPSBNb250aDsKICAgICAgeWVhciA9IFllYXI7CiAgICB9CiAgaW50IGdldERheSgpIHtyZXR1cm4gZGF5O30KICBpbnQgZ2V0TW9udGgoKSB7cmV0dXJuIG1vbnRoO30KICBpbnQgZ2V0WWVhcigpIHtyZXR1cm4geWVhcjt9Cn07CgovKkludmVudG9yeUl0ZW0gY29udGFpbmluZyBOYW1lLCBDb3N0LCBRdWFudGl0eSwgRGF0ZVB1cmNoYXNlZChP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