Create the .cpp file of this .h file in C++
#include using namespace std;int GetNextID();class Passenger {public:Passenger(); // New passenger, assigning ID using GetNextIDPassenger(int, string, string); // ID, origin, destinationvoid Initialize(int, string, string); // ID, origin, destinationint GetID() {return ID;}string GetOrigin(){ return origin;}string GetDest() {return destination;}private:int ID; // A unique ID number for the passengerstring origin; //Airport identifierstring destination; // Airport identifierint GetNextID(); // Assigns ID's sequentially, starting with 1001};
Passenger(); // New passenger, assigning ID using GetNextIDPassenger(int, string, string); // ID, origin, destinationvoid Initialize(int, string, string); // ID, origin, destinationint GetID() {return ID;}string GetOrigin(){ return origin;}string GetDest() {return destination;}private:int ID; // A unique ID number for the passengerstring origin; //Airport identifierstring destination; // Airport identifierint GetNextID(); // Assigns ID's sequentially, starting with 1001};
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here