Advertisement
Guest User

User.h

a guest
Mar 22nd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.54 KB | None | 0 0
  1. /*
  2.  * User.h
  3.  *
  4.  *  Created on: Mar 9, 2018
  5.  *      Author: joewy
  6.  */
  7.  
  8. #ifndef USER_H_
  9. #define USER_H_
  10.  
  11. //#include <string>
  12. #include "List.h"
  13. #include "BST.h"
  14. #include "User.h"
  15.  
  16. class User
  17. {
  18. private:
  19.     string firstName;
  20.     string lastName;
  21.     string userName;
  22.     string passWord;
  23.     string city;
  24.     string state;
  25.     unsigned ID;
  26.     List<string> friends; // remove linked list of friends if nec.
  27.     BST<string> friendBST;
  28.     BST<User> friendUser;
  29.     List<string> interests;
  30.  
  31. public:
  32.     /**Constructors*/
  33.     User();
  34.     User(string f, string l, string u, string p, string c, string s, unsigned id);
  35.  
  36.     /**Access Functions*/
  37.  
  38.     string getFirstname() const;
  39.     string getLastname() const;
  40.     string getUsername() const;
  41.     string getPassword() const;
  42.     string getCity() const;
  43.     string getState() const;
  44.     bool searchFriend(string name) const;
  45.     unsigned getID() const;
  46.     List<string> getInterest() const;
  47.     List<string> getFriend() const;
  48.     BST<User> getBST();
  49.  
  50.  
  51.     /**Manipulation Procedures*/
  52.     void setFirstname(string f);
  53.     void setLastname(string l);
  54.     void setUsername(string u);
  55.     void setPassword(string p);
  56.     void setCity(string c);
  57.     void setState(string s);
  58.     void setFriends(string fr);
  59.     void removeFriend(string fr);
  60.     void setBST(User u);
  61.     void printBST();
  62.     void printFriends() const;
  63.     void setInterests(string i);
  64.  
  65.  
  66.     /**Additional Functions*/
  67.     friend ostream& operator<<(ostream & out, const User& user);
  68.     bool operator==(const User& user);
  69.     bool operator<(const User& user);
  70.     bool operator>(const User& user);
  71.  
  72. };
  73.  
  74.  
  75.  
  76. #endif /* USER_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement