You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Ticketing System
  2. ## Person.hpp / Person.cpp
  3. #### Constructors
  4. | Parameters | Task |
  5. |:-----------|:-----------------------------|
  6. | `()` | Empty constructor. |
  7. | `(string newName, string newEmail, string newPhoneNo, string newPassword, int newId)` | Constructor with all parameters to populate all data slots in the object. |
  8. #### Functions
  9. | Function | Task |
  10. |:----------------------|:-------------------------|
  11. | `void setName(string);` | Set `name` to the new given input. |
  12. | `string getName();` | Return `name` to caller. |
  13. | `void setEmail(string);` | Set `email` to the new given input. |
  14. | `string getEmail();` | Return `email` to caller. |
  15. | `void setPhoneNo(string);` | Set `phoneNo` to the new given input. |
  16. | `string getPhoneNo();` | Return `phoneNo` to caller. |
  17. | `void setPassword(string);` | Set `password` to the new given input. |
  18. | `string getPassword();` | Return `password` to the caller. |
  19. | `bool checkPassword(string);` | Return if the given string matches `password`. |
  20. | `int getId();` | Return `id` to the caller. |
  21. ## LogInSystem.hpp / LogInSystem.cpp
  22. #### Constructors
  23. | Parameters | Task |
  24. |:-----------|:-----------------------------------|
  25. | `()` | Creates an empty `LogInSystem` with nothing in the `users` vector. |
  26. | `(string filename)` | Initialize the `users` vector from the file of the given filename. |
  27. #### Functions
  28. | Function | Task |
  29. |:----------------------|:-------------------------|
  30. | `Person getUser(string);` | Takes in a string parameter that will be used to searched for a matching username in the users vector. |
  31. | `Person getUser(int);` | Takes in an int parameter that will be used to searched for a matching id in the users vector. |
  32. | `int login();` | Verify user credentials and return the user's id. |
  33. | `void loggedIn(Person);` | Takes in a Person parameter after the user has logged in as that identity. It provides the user options to display and modify the information of that specific identity in the database (vector). |
  34. | `Person registration();` | Request all the required information from the user to register for a new account and add them into the users vector. |
  35. | `Person editCredentials(Person);` | Takes in a `Person` parameter and make edit to it according to the user's intention. It will then return the updated Person to the caller. |
  36. | `void update(Person);` | Take in a `Person` parameter that is to be updated into the users vector. It will search for the `Person` in the vector with matching ID and replace it. |
  37. | `string chgUsername();` | Changes the `username` of the `Person`. |
  38. | `string chgPassword(Person);` | Changes the `password` of the `Person`. |
  39. | `string chgEmail();` | Changes the `email` of the `Person`. |
  40. | `string chgPhoneNo();` | Changes the `phoneNo` of the `Person`.
  41. ## Vehicle.hpp / Vehicle.cpp
  42. #### Constructors
  43. | Parameters | Task |
  44. |:-----------|:-----------------------------|
  45. | `(int length, int width, int id)` | Basic constructor that fill in the rest of the missing information with "TBA". |
  46. | `(string type, int length, int width, string origin, string destination, string dateNtime, int id)` | Complete constructor with all the information except the seatMap. |
  47. | `(string type, int length, int width, string origin, string destination, string dateNtime, int id, vector< vector<int> > seatMap)` | Complete constructor that is used to read data from the database. |
  48. #### Functions
  49. | Function | Task |
  50. |:---------------------------|:-------------------------|
  51. | `void setType(string type);` | Set `type` to the new given input. |
  52. | `void setOrigin(string origin);` | Set `origin` to the new given input. |
  53. | `void setDestination(string destination);` | Set `destination` to the new given input. |
  54. | `void setDateNTime(string dateNtime);` | Set `dateNtime` to the new given input. |
  55. | `string getType();` | Return `type` to the caller. |
  56. | `int getLength();` | Return `length` to the caller. |
  57. | `int getWidth();` | Return `width` to the caller. |
  58. | `string getOrigin();` | Return `origin` to the caller. |
  59. | `string getDestination();` | Return `destination` to the caller. |
  60. | `string getDateNTime();` | Return `dateNtime` to the caller. |
  61. | `int getId();` | Return `id` to the caller. |
  62. | `void initialize();` | Initialize the `seatMap` to the intended size. |
  63. | `bool bookSeat(int x, int y, int guestId);` | Register a specific seat to the given guestId. Returns if the proces is successful. |
  64. | `bool checkAvailabilty(int x, int y);` | Check if the seat at the given coordinate is still available. |
  65. | `void printMap();` | Print the map with label of 'A' as *available* and 'X' as *not available*. |
  66. | `void printMap(int guestId);` | Takes in the user id and print the map with label of 'A' as *available*, 'U' as the *user* and 'X' as *not available*. |
  67. ## VehicleManager.hpp / VehicleManager.cpp
  68. #### Constructors
  69. | Parameters | Task |
  70. |:-----------|:--------------------------------|
  71. | `()` | Empty constructor. Creates an empty vector of `vehicles`. |
  72. | `(string jsonFile)` | Creates a vector of `vehicles` by importing the data from a json file. |
  73. #### Functions
  74. | Function | Task |
  75. |:----------------------------------|:-------------------------|
  76. | `bool add(Vehicle newVehicle);` | Add a new `Vehicle` into the vector. |
  77. | `bool remove(Vehicle toRemove);` | Remove a specific `Vehicle` from the vector. |
  78. | `Vehicle get(int id);` | Get a specific `Vehicle` with the given `id`. |
  79. | `void toJson(string jsonFile);` | Export all data to a json file. |
  80. | `int getId();` | Returns a suggested `id` for the next item. |