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.

40 lines
1.0 KiB

  1. #include <string>
  2. #include <iostream>
  3. #include <vector>
  4. using namespace std;
  5. class Vehicle
  6. {
  7. private:
  8. string type;
  9. int length;
  10. int width;
  11. string origin;
  12. string destination;
  13. string dateNtime;
  14. int id;
  15. vector< vector<int> > seatMap;
  16. public:
  17. Vehicle(int length, int width, int id);
  18. Vehicle(string type, int length, int width, string origin, string destination, string dateNtime, int id);
  19. Vehicle(string type, int length, int width, string origin, string destination, string dateNtime, int id, vector< vector<int> > seatMap);
  20. void setType(string type);
  21. void setOrigin(string origin);
  22. void setDestination(string origin);
  23. void setDateNTime(string dateNtime);
  24. string getType();
  25. int getLength();
  26. int getWidth();
  27. string getOrigin();
  28. string getDestination();
  29. string getDateNTime();
  30. int getId();
  31. void initialize();
  32. bool bookSeat(int x, int y, int guestId);
  33. bool checkAvailabilty(int x, int y);
  34. int getGuest(int x, int y);
  35. void printMap();
  36. void printMap(int guestId);
  37. };