My Project
|
The main class to define passenger. More...
#include <passenger.h>
Public Member Functions | |
Passenger (int=-1, std::string="Nobody") | |
Constructs a passenger with a standard name and id. More... | |
void | Update () |
Method to update wait at stop. | |
void | GetOnBus () |
Passenger getting on bus. | |
int | GetTotalWait () const |
Total wait time on stop and on bus. | |
bool | IsOnBus () const |
Method to decide if a passenger is on bus. More... | |
int | GetDestination () const |
Get destination id of the passenger. More... | |
void | Report (std::ostream &out) const |
Public reporter. | |
The main class to define passenger.
|
explicit |
Constructs a passenger with a standard name and id.
[in] | int | holding an id number |
[in] | string | holding a name of a created passenger. |
int Passenger::GetDestination | ( | ) | const |
Get destination id of the passenger.
bool Passenger::IsOnBus | ( | ) | const |
Method to decide if a passenger is on bus.
This function shows status of whether a passenger is on bus.