-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBus.h
36 lines (29 loc) · 807 Bytes
/
Bus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef UNTITLED1_BUS_H
#define UNTITLED1_BUS_H
#include <string>
#include "PQueue.h"
#include "Passenger_Class.h" // Update the include to match your Passenger class
class Bus {
private:
PriorityQueue<Passenger*> onBoard; // Updated to use Passenger pointers
int timeStep;
char status;
std::string direction;
int counter;
public:
Bus(); // Constructor
// Setters
void setTimeStep(int x);
void setStatus(char x);
void setDirection(const std::string& x);
void setCounter(int x);
// Getters
int getTimeStep() const;
char getStatus() const;
std::string getDirection() const;
int getCounter() const;
// Other functionalities
void addPassenger(Passenger* passenger, int p);
void removePassenger();
};
#endif // UNTITLED1_BUS_H