Advertisement
Guest User

Untitled

a guest
Apr 12th, 2018
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. /*-----------------------------------------------------------------
  2. System Name: Zoinkers!
  3. Artifact Name: Zoinkers.h
  4. Create Date: March 25, 2018
  5. Author: Shah Ohm, oshah@kent.edu
  6. Version: 2.0
  7. ------------------------------------------------------------------*/
  8.  
  9. #ifndef Zoinkers_hpp
  10. #define Zoinkers_hpp
  11.  
  12. #include <stdio.h>
  13. #include <iostream>
  14. #include <vector>
  15. #include <ctime>
  16. #include <string>
  17. #include <sstream>
  18. #include <algorithm>
  19.  
  20. class Animal;
  21. class Exhibit;
  22. class Schedule;
  23. class User;
  24. class Auth;
  25. class Zoink;
  26. class Favorability;
  27.  
  28.  
  29. class Favorability{
  30. public:
  31. Favorability(int tmpID, int tmpFav) {ID = tmpID; fav = tmpFav;};
  32. bool operator<(const Favorability& tmp){return fav < tmp.fav;};
  33. //acessors
  34. int returnID(){return ID;};
  35. int returnFav(){return fav;};
  36. private:
  37. int ID;
  38. int fav;
  39. };
  40.  
  41. class Animal{
  42. public:
  43. Animal(int ID, int AniID, std::string str);
  44. void displayInfo(int);
  45. void addAnimal();
  46. void remAnimal();
  47. int returnAID(){return AID;};
  48. private:
  49. int indivFav;
  50. int AID;
  51. int EID;
  52. std::string name;
  53. };
  54.  
  55. class Exhibit{
  56. public:
  57. //needs constructor
  58. Exhibit(int,std::string,int);
  59. void addAnimal(Animal);
  60. std::vector<int> getAnimalWithinExibit();
  61. int returnEID(){return EID;};
  62. int getPrice(){return price;};
  63. std::string getName(){return exhibitName;};
  64.  
  65. private:
  66. int EID;
  67. std::string exhibitName;
  68. std::vector<Animal> animals; // Animals in current exhibit
  69. int price;
  70. };
  71.  
  72. class Schedule{
  73. public:
  74. void displayOpts();
  75. void displaySchedule();
  76.  
  77. private:
  78. };
  79.  
  80. class User{
  81. public:
  82. User(std::string user, std::string pass, int tmpRole);
  83. void displayOptions(User,Zoink&);
  84. User createUser(std::string name, std::string pass);
  85. bool checkUser(std::string, std::string);
  86. void avgFavExhibit(Zoink& zoinker);
  87. int getExhibitFav(int i){return exhibitFav[i].returnFav();};
  88. int getExhibitSize(){return exhibitFav.size();};
  89. std::string generateSched(User userone, Zoink& zoinker);
  90.  
  91. void dateParse();
  92. void checkBudget();
  93. void checkDiscount();
  94. void updateFav();
  95. private:
  96. std::string username;
  97. std::string password;
  98. std::string userID;
  99. Schedule userSchedule;
  100. int role;
  101. //Happiness rating
  102. int happiness;
  103.  
  104. //Info
  105. int day, month, year;
  106. std::string date;
  107. int budget;
  108.  
  109. //Discount Code Vector
  110. std::vector<std::string> DiscountCodes;
  111.  
  112. //Hardcoded User
  113. std::string testUser = "WARPIGS";
  114. std::string testPass = "SABBATH";
  115.  
  116. std::vector<Favorability> favanimal; // per animal
  117. std::vector<Favorability> exhibitFav; // per exhibit
  118. std::vector<int> testFavorability {1, 4, 5, 3, 2}; //Hardcoded case for TestUser
  119. };
  120.  
  121. class Auth{
  122. public:
  123. Auth(User user1);
  124. void authSucess(){authenicated = true;};
  125. void authFailure(){authenicated = false;};
  126. bool isAuth(){return authenicated;};
  127. private:
  128. bool authenicated;
  129. };
  130.  
  131. class Zoink{
  132. public:
  133. Zoink();
  134. std::vector<int> getAnimalWithEID(int ExID);
  135. void Login();
  136. bool isLogin();
  137. int getNumExhib(){return exhibits.size();};
  138. int getPriceByEID(int);
  139. void getNameByEID(std::vector<int>);
  140. private:
  141. std::vector<Exhibit> exhibits;
  142. };
  143. #endif /* Zoinkers_hpp */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement