//File : inventory.h //Author : Andre Long //Due : October 13, 2004 //Description: This is the header file for the inventory class program (CH13pc2) // BUT is now modified to include "cashRegister" as a friend class // for CH13pc8 #ifndef inventory_h #define inventory_h class inventory { private: int itemNumber; int quantity; float cost; float totalCost; public: inventory() { itemNumber = 0; quantity = 0; cost = 0; totalCost = 0; } inventory(int a, int b, float c) { itemNumber=a; quantity=b; cost=c; totalCost = setTotalCost(); } void setItemNumber(int itemnum) { itemNumber=itemnum; } void setQuantity(int howMany) { quantity=howMany; } void setCost(float howMuch) { cost=howMuch; } float setTotalCost() { totalCost=(quantity * cost); return totalCost; } int getItemNumber() { return itemNumber; } int getQuantity() { return quantity; } float getCost() { return cost; } float getTotalCost() { return totalCost; } friend class cashRegister; }; #endif