Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.md 5.6 KiB

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