-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainMenu.cpp
34 lines (31 loc) · 880 Bytes
/
MainMenu.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
#include "MainMenu.h"
#include "OwnerMenu.h"
#include "PropertyMenu.h"
#include <iostream>
using namespace std;
void MainMenu::displayOptions() {
cout << "Vacation Rental Price Recommendation System" << endl;
cout << "===========================================" << endl;
cout << "\nMain Menu" << endl;
cout << "1. Manage user profile" << endl;
cout << "2. Manage property info" << endl;
cout << "3. Exit" << endl;
}
void MainMenu::processOptions(int option) {
if (option == 1) {
OwnerMenu om;
om.displayOptions();
om.selectOption(4);
system("cls");
displayOptions(); //MainMenu's displayOptions()
} else if (option == 2) {
PropertyMenu pm;
pm.displayOptions();
pm.selectOption(6);
system("cls");
displayOptions(); //MainMenu's displayOptions()
} else if (option == 3) {
system("cls");
cout << "Program exited successfully. Bye." << endl;
}
}