#ifndef _GROCERY #define _GROCERY #include #include #include using namespace std; class Grocery { public: Grocery(); //Default constructor Grocery( ifstream& fin ); //Boundary constructor Grocery( string Name, double Markup, int Cost ); //Parametric constructor string getName() const;//Inspector int getCost() const;//Inspector double getMarkup() const;//Inspector int getPrice() const;//Property = ceil(cost*markup) virtual void Extract(ifstream& fin ); //Boundary input virtual void Insert( ostream& fout ); //Boundary output protected: virtual void Get( ifstream& fin); //Boundary input virtual void Put( ostream& fout); //Boundary output private: string name; double markup; // must be non-negative (1.0 = no profit) int cost; // unit cost in cents };//Grocery #endif