/* Filename: product3.h Author: Br. David Carlson Date: July 5, 1998 Revised: July 17, 2000 This file sets up the StringMax constant, the ShortString typename, and most importantly, the Product class, with the fields and functions shown below. */ #include using namespace std; const int StringMax = 48; typedef char ShortString[StringMax]; class Product { friend bool operator==(const Product & LHS, const Product & RHS); friend ostream & operator<<(ostream & OutputStream, const Product & Prod); private: ShortString Name; int Year; float Price; public: Product(ShortString InitialName = "", int InitialYear = 0, float InitialPrice = 0.0); Product(const Product & OldProduct); void Print(void) const; void GetName(ShortString ProductName) const; int GetYear(void) const; float GetPrice(void) const; void ChangePrice(float NewPrice); bool operator<(const Product & RHS) const; Product & operator=(const Product & RHS); };