-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPassenger.cpp
47 lines (36 loc) · 1.18 KB
/
Passenger.cpp
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
37
38
39
40
41
42
43
44
45
46
47
#include "Passenger.h"
#include <iostream>
using namespace std;
namespace AirlineApp {
Passenger::Passenger(const string& firstName, const string& lastName, const string seatNumber) :
mFirstName(firstName), mLastName(lastName), mPassengerSeatNumber(seatNumber)
{ }
const string& Passenger::getFirstName() const {
return mFirstName;
}
const string& Passenger::getLastName() const {
return mLastName;
}
void Passenger::setTicketNumber(int ticketNumber) {
mTicketNumber = ticketNumber;
}
int Passenger::getTicketNumber() const {
return mTicketNumber;
}
const string& Passenger::getPassengerSeatNumber() const {
return mPassengerSeatNumber;
}
void Passenger::displayPassenger() const {
cout << endl;
cout << "Name: " << getFirstName() << " " << getLastName() << endl;
cout << "Ticket Number: " << getTicketNumber() << endl;
cout << endl;
}
void Passenger::displayTicketInformation() const {
cout << endl;
cout << "Name: " << getFirstName() << " " << getLastName() << endl;
cout << "Ticket Number: " << getTicketNumber() << endl;
cout << "Seat Number: " << getPassengerSeatNumber() << endl;
cout << endl;
}
}