-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
46 lines (40 loc) · 1.52 KB
/
main.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
#include "Menu.h"
using namespace std;
int main() {
string reservoirCSV, stationsCSV, citiesCSV, pipesCSV;
bool dataSetChosen = false;
while (!dataSetChosen) {
cout << "\n";
cout << makeBold("Choose dataset:") << endl;
cout << "1. Portugal Continental (large dataset)" << endl;
cout << "2. Madeira (small dataset)" << endl;
cout << "\n";
cout << "Enter your choice (1 or 2): ";
int choice;
cin >> choice;
if (choice == 1) {
reservoirCSV = "../data/large-dataSet/Reservoirs.csv";
stationsCSV = "../data/large-dataSet/Stations.csv";
citiesCSV = "../data/large-dataSet/Cities.csv";
pipesCSV = "../data/large-dataSet/Pipes.csv";
dataSetChosen = true;
} else if (choice == 2) {
reservoirCSV = "../data/small-dataSet/Reservoirs_Madeira.csv";
stationsCSV = "../data/small-dataSet/Stations_Madeira.csv";
citiesCSV = "../data/small-dataSet/Cities_Madeira.csv";
pipesCSV = "../data/small-dataSet/Pipes_Madeira.csv";
dataSetChosen = true;
} else {
cout << "INVALID CHOICE PLEASE TRY AGAIN" << endl;
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
}
}
Menu menu(reservoirCSV, stationsCSV, citiesCSV, pipesCSV);
if (menu.run()) {
cout << "ERROR: COULDN'T RUN MENU INTERFACE" << endl;
return 1;
}
cout << "BYE BYE :)" << endl;
return 0;
}