#include "passenger.h" Passenger::Passenger(string newname, int newFreqFlyerNum) { name = newname; freqFlyerNum = newFreqFlyerNum; numMiles = 0; } bool Passenger::canFlyFree(FlightType toBuy) { if ((toBuy == DOMESTIC && numMiles > 5000) || (toBuy == INTL && numMiles > 10000)) { return true; } return false; } void Passenger::purchaseFreqFlyerTix(FlightType toBuy) { if(canFlyFree(toBuy)) { if(toBuy == DOMESTIC) { numMiles-=5000; } else { numMiles-=10000; } cout << "Purchase successful.\n"; } else { cout << "Cannot purchase frequent flyer ticket.\n"; } }