fueanta

HashTable :: Item.cpp

May 17th, 2017
128
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // Created by Taqui on 5/13/2017.
  3. //
  4.  
  5. #include <iostream>
  6.  
  7. #include "Item.h"
  8.  
  9. using namespace std;
  10.  
  11. Item::Item()
  12. {
  13.     // this->next = NULL;
  14. }
  15.  
  16. Item::Item(const string &name, const string &phoneNumber) /* : Item() */
  17. {
  18.     this->name = name;
  19.     this->phoneNumber = phoneNumber;
  20. }
  21.  
  22. const string &Item::getName() const
  23. {
  24.     return name;
  25. }
  26.  
  27. void Item::setName(const string &name)
  28. {
  29.     Item::name = name;
  30. }
  31.  
  32. const string &Item::getPhoneNumber() const
  33. {
  34.     return phoneNumber;
  35. }
  36.  
  37. void Item::setPhoneNumber(const string &phoneNumber)
  38. {
  39.     Item::phoneNumber = phoneNumber;
  40. }
  41.  
  42. void Item::show()
  43. {
  44.     cout << "Contact Name: " << name << endl;
  45.     cout << "Contact Number: " << phoneNumber << endl;
  46. }
RAW Paste Data