-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (24 loc) · 899 Bytes
/
main.cpp
File metadata and controls
33 lines (24 loc) · 899 Bytes
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
#include <iostream>
#include "inputCheck.h"
#include "inputProcessor.h"
using namespace std;
int main() {
//input files
string peopleFile = "people.txt";
string paymentsFile = "payments.txt";
// an instance of inputCheck to validate the input files
inputCheck check;
if (!check.isFileEmpty(peopleFile) && !check.isFileEmpty(paymentsFile))
{
cout << "Processing files.." << endl;
// an instance of inputProcessor to handle file processing
inputProcessor processor;
// process the files and associate people with their payment details
processor.processFiles(peopleFile, paymentsFile);
}
//call the isFileEmpty method from inputCheck in order to determine whether the people.txt file is empty
else if(check.isFileEmpty(peopleFile)) {
cout << "The people.txt file is empty." << endl;
}
return 0;
}