// includes #include "ItemInfo.h" // Default constructor ItemInfo::ItemInfo() { // initialize all string variables to blank space item = type = author = email = price = status = ""; } //////////////////////////////////////////////////////////////// // Set the status of the item // // Parameters: // const string newStatus: the new status of the item // // Pre: no new status has been set // // Post: new staus set // // Returns: none // // Called by: Controller // Calls: none // void ItemInfo::SetAvailability(const string newStatus) { status = newStatus; } /////////////////////////////////////////////////////////////// // Set the name of the item // // Parameters: // const string newItem: the new name of the item // // Pre: no new Item has been set // // Post: new Item set // // Returns: none // // Called by: Controller // Calls: none // void ItemInfo::SetItem(const string newItem) { item = newItem; } /////////////////////////////////////////////////////////////// // Set the type of the item // // Parameters: // const string newType: the new type of the item // // Pre: no new type has been set // // Post: new type set // // Returns: none // // Called by: Controller // Calls: none // void ItemInfo::SetType(const string newType){ type = newType; } ////////////////////////////////////////////////////////////// // Set the Author of the item // // Parameters: // const string newAuthor: the new Author of the item // // Pre: no new Author has been set // // Post: new Author set // // Returns: none // // Called by: Controller // Calls: none // void ItemInfo::SetAuthor(const string newAuthor){ author = newAuthor; } ////////////////////////////////////////////////////////////// // Set the Email of the item // // Parameters: // const string newEmail: the new Email of the item // // Pre: no new Email has been set // // Post: new Email set // // Returns: none // // Called by: Controller // Calls: none // void ItemInfo::SetEmail(const string newEmail){ email = newEmail; } ////////////////////////////////////////////////////////////// // Set the Price of the item // // Parameters: // const string newPrice: the new Price of the item // // Pre: no new Price has been set // // Post: new Price set // // Returns: none // // Called by: Controller // Calls: none // void ItemInfo::SetPrice (const string newPrice){ price = newPrice; } //////////////////////////////////////////////////////////////// // Get the status of the item // // Parameters: // none // // Pre: no status has been returned // // Post: status returned // // Returns: status // // Called by: Controller // Calls: none // string ItemInfo::GetAvailability() const { return status; } //////////////////////////////////////////////////////////////// // Get the type of the item // // Parameters: // none // // Pre: no type has been returned // // Post: type returned // // Returns: type // // Called by: Controller // Calls: none // string ItemInfo::GetType() const{ return type; } /////////////////////////////////////////////////////////////// // Get the Author of the item // // Parameters: // none // // Pre: no Author has been returned // // Post: Author returned // // Returns: Author // // Called by: Controller // Calls: none // string ItemInfo::GetAuthor() const{ return author; } /////////////////////////////////////////////////////////////// // Get the Email of the item // // Parameters: // none // // Pre: no Email has been returned // // Post: Email returned // // Returns: Email // // Called by: Controller // Calls: none // string ItemInfo::GetEmail() const{ return email; } /////////////////////////////////////////////////////////////// // Get the Price of the item // // Parameters: // none // // Pre: no Price has been returned // // Post: Price returned // // Returns: Price // // Called by: Controller // Calls: none // string ItemInfo::GetPrice() const{ return price; } /////////////////////////////////////////////////////////////// // Get the Item of the item // // Parameters: // none // // Pre: no Item has been returned // // Post: Item returned // // Returns: Item // // Called by: Controller // Calls: none // string ItemInfo::GetItem() const { return item; }