-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.cpp
70 lines (56 loc) · 1.38 KB
/
Message.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/****************************************************************
FILE: Message.cpp
AUTHOR: Tommy Deng
s199762338
PURPOSE: CPP file for the message object (Message.h).
Contains commonly used text outputs and other
text/formatting related functions.
****************************************************************/
#include "Message.h"
Message::Message()
{
}
Message::~Message()
{
}
string Message::menu()
{
stringstream ss;
ss << "Welcome to Fly-By-Night Airline's Booking System" << endl;
ss << "Please pick an option from the menu below" << endl;
ss << endl;
ss << "\t1. Book reservation" << endl;
ss << "\t2. Cancel reservation" << endl;
ss << "\t3. Display the passenger manifest" << endl;
ss << "\t4. Display the flight schedule" << endl;
ss << "\t5. Display the destinations" << endl;
ss << "\t6. Display flight reservations" << endl;
ss << "\t7. Search for a customer's information" << endl;
ss << "\t8. Cancel entire flight" << endl;
ss << "\t9. Exit" << endl;
ss << endl;
ss << "Enter the number of a menu option: ";
return ss.str();
}
string Message::invalid()
{
return "Invalid input. Please try again.";
}
string Message::tabs(int numTabs)
{
stringstream ss;
if (numTabs > 0)
{
for (int i = 0; i < numTabs; i++)
ss << "\t";
return ss.str();
}
else
{
return "";
}
}
string Message::exitProgram()
{
return "Terminating program.";
}