-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpassenger.cpp
More file actions
67 lines (63 loc) · 1.6 KB
/
passenger.cpp
File metadata and controls
67 lines (63 loc) · 1.6 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "passenger.h"
#include "seat.h"
#include <iostream>
#include <fstream>
#include <stdio.h>
using namespace std;
Passenger::Passenger(const string &input_fName, const string &input_lName,
const string &input_phone, const Seat &input_seat, int input_passID)
: fName(input_fName), lName(input_lName), phone(input_phone),
passSeat(input_seat), passId(input_passID) {}
string Passenger::getFName() const {
return fName;
}
string Passenger::getLName() const {
return lName;
}
string Passenger::getPhone() const {
return phone;
}
Seat Passenger::getSeat() const {
return passSeat;
}
int Passenger::getPassId() const {
return passId;
}
void Passenger::setFName(const string &input_fName) {
fName = input_fName;
}
void Passenger::setLName(const string &input_lName) {
lName = input_lName;
}
void Passenger::setPhone(const string &input_phone) {
phone = input_phone;
}
void Passenger::setPassSeat(const Seat &input_seat) {
passSeat = input_seat;
}
void Passenger::setPassId(int input_passID){
passId = input_passID;
}
void Passenger::pass_display() const
{
int spaces = 21-fName.size();
cout << fName;
while(spaces>0){
cout << ' ';
spaces--;
}
spaces = 21 - fName.size();
cout << lName;
while(spaces>0){
cout << ' ';
spaces--;
}
spaces = 21 - fName.size();
cout << phone;
while(spaces>0){
cout << ' ';
spaces--;
}
cout <<passSeat.get_rowNum()<<char(passSeat.get_seatNum()+'A')
<< ' ' <<passId;
}