/* Filename: product3.h Author: Br. David Carlson Date: July 5, 1998 Revised: July 17, 2000 and April 2, 2021 This file defines a class called Product. This version uses a string object to hold the name of each product. This is unlike the earlier versions, which used C-strings (char arrays). */ // This keeps the .h file from being included, directly or indirectly, more than once. #pragma once #include #include using namespace std; class Product { friend bool operator==(const Product & LHS, const Product & RHS); friend ostream & operator<<(ostream & OutputStream, const Product & Prod); private: string Name; int Year; double Price; public: Product(string InitialName = "", int InitialYear = 0, double InitialPrice = 0.0); Product(const Product & OldProduct); ~Product(void); void Print(void) const; string GetName(void) const; int GetYear(void) const; double GetPrice(void) const; void SetName(string NewName); void SetPrice(double NewPrice); void SetYear(int NewYear); bool operator<(const Product & RHS) const; Product & operator=(const Product & RHS); };