Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*-----------------------------------------------------------------
- System Name: Zoinkers!
- Artifact Name: Zoinkers.h
- Create Date: March 25, 2018
- Author: Shah Ohm, oshah@kent.edu
- Version: 2.0
- ------------------------------------------------------------------*/
- #ifndef Zoinkers_hpp
- #define Zoinkers_hpp
- #include <stdio.h>
- #include <iostream>
- #include <vector>
- #include <ctime>
- #include <string>
- #include <sstream>
- #include <algorithm>
- class Animal;
- class Exhibit;
- class Schedule;
- class User;
- class Auth;
- class Zoink;
- class Favorability;
- class Favorability{
- public:
- Favorability(int tmpID, int tmpFav) {ID = tmpID; fav = tmpFav;};
- bool operator<(const Favorability& tmp){return fav < tmp.fav;};
- //acessors
- int returnID(){return ID;};
- int returnFav(){return fav;};
- private:
- int ID;
- int fav;
- };
- class Animal{
- public:
- Animal(int ID, int AniID, std::string str);
- void displayInfo(int);
- void addAnimal();
- void remAnimal();
- int returnAID(){return AID;};
- private:
- int indivFav;
- int AID;
- int EID;
- std::string name;
- };
- class Exhibit{
- public:
- //needs constructor
- Exhibit(int,std::string,int);
- void addAnimal(Animal);
- std::vector<int> getAnimalWithinExibit();
- int returnEID(){return EID;};
- int getPrice(){return price;};
- std::string getName(){return exhibitName;};
- private:
- int EID;
- std::string exhibitName;
- std::vector<Animal> animals; // Animals in current exhibit
- int price;
- };
- class Schedule{
- public:
- void displayOpts();
- void displaySchedule();
- private:
- };
- class User{
- public:
- User(std::string user, std::string pass, int tmpRole);
- void displayOptions(User,Zoink&);
- User createUser(std::string name, std::string pass);
- bool checkUser(std::string, std::string);
- void avgFavExhibit(Zoink& zoinker);
- int getExhibitFav(int i){return exhibitFav[i].returnFav();};
- int getExhibitSize(){return exhibitFav.size();};
- std::string generateSched(User userone, Zoink& zoinker);
- void dateParse();
- void checkBudget();
- void checkDiscount();
- void updateFav();
- private:
- std::string username;
- std::string password;
- std::string userID;
- Schedule userSchedule;
- int role;
- //Happiness rating
- int happiness;
- //Info
- int day, month, year;
- std::string date;
- int budget;
- //Discount Code Vector
- std::vector<std::string> DiscountCodes;
- //Hardcoded User
- std::string testUser = "WARPIGS";
- std::string testPass = "SABBATH";
- std::vector<Favorability> favanimal; // per animal
- std::vector<Favorability> exhibitFav; // per exhibit
- std::vector<int> testFavorability {1, 4, 5, 3, 2}; //Hardcoded case for TestUser
- };
- class Auth{
- public:
- Auth(User user1);
- void authSucess(){authenicated = true;};
- void authFailure(){authenicated = false;};
- bool isAuth(){return authenicated;};
- private:
- bool authenicated;
- };
- class Zoink{
- public:
- Zoink();
- std::vector<int> getAnimalWithEID(int ExID);
- void Login();
- bool isLogin();
- int getNumExhib(){return exhibits.size();};
- int getPriceByEID(int);
- void getNameByEID(std::vector<int>);
- private:
- std::vector<Exhibit> exhibits;
- };
- #endif /* Zoinkers_hpp */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement