/********************************************************************* C201 Computer Programming II Fall 2006 Dana Vrajitoru & A class to represent products in stock in a shop. **********************************************************************/ #ifndef PRODUCT_H #define PRODUCT_H enum Category {food_ty, health_ty, cloth_ty, home_ty}; class Product { private: char name[20]; Category type; int quantity, barcode; float price; public: // Constructors. // Default constructor. Product(); //Copy constructor. Product(Product &data); //Initializing functions. void Init(); void Init(Product &data); // Input-output void Input(); void Output(); // Data manipulation. // Add more products to the stock. void Add(int how_many); // Remove some products from the stock. It needs to be a bool // because if we don't have that many items in the stock we can't // remove them. bool Remove(int how_many); // Declare a friend class to give it full access to this one. friend class Inventory; }; #endif