/*

  InventoryRecord.h

  Componants: InventoryRecord.h, FuncList.h, InventoryRecord.cpp, FuncList.cpp, Try.cpp

  Author: Ahmad Mobasseri

*/

 

#include <iostream>

using namespace std;

 

class InventoryItem

{

      string itemID;

      string itemDesc;

public:

      InventoryItem() {itemID=""; itemDesc="";}

      // Mutators

      void setID   (string ID)   {itemID = ID;}

      void setDesc (string Desc) {itemDesc = Desc;}

      // Accessors

      string getID()   {return itemID;}

      string getDesc() {return itemDesc;}

};

 

class InventoryRecord : public InventoryItem

{

      double UnitCost;

      long   NumberInStock;

      string Location;

public:

      InventoryRecord() {UnitCost=0; NumberInStock=0; string Location="";}

      // Mutators

      void setCost  (double Cost) {UnitCost = Cost;}

      void setStock (long Stock)  {NumberInStock = Stock;}

      void setLoc   (string Loc)  {Location = Loc;}

      // Accessors

      double getCost()  {return UnitCost;}

      long   getStock() {return NumberInStock;}

      string getLoc()   {return Location;}

         

  bool equals(string Last);

  bool operator>(InventoryRecord&);

  bool operator==(InventoryRecord&);

  bool operator==(string);

};

 

ostream& operator<<(ostream&, InventoryRecord);

istream& operator>>(istream&, InventoryRecord&);