49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
#include <iostream>
|
|
#include <fstream>
|
|
#include "employee.h"
|
|
#include "salaried.h"
|
|
#include "hourly.h"
|
|
#include "faculty.h"
|
|
#include "administrator.h"
|
|
#include "util.h"
|
|
#include "campus.h"
|
|
|
|
using namespace std;
|
|
|
|
|
|
int main() { //driver for program
|
|
campus c = campus();
|
|
bool keep_going = true;
|
|
while(keep_going) {
|
|
string input;
|
|
cout << "(a)dd worker, (r)emove worker, (d)isplay worker, add (h)ours, \n";
|
|
cout << " (s)ort workers, advance (m)onth, add (f)ile, (q)uit" << endl;
|
|
cin >> input;
|
|
cin.ignore();
|
|
if(input == "a") {
|
|
c.add_worker();
|
|
}
|
|
if(input == "r") {
|
|
c.delete_worker();
|
|
}
|
|
if(input == "h") {
|
|
c.set_hours();
|
|
}
|
|
if(input == "d") {
|
|
c.display_worker();
|
|
}
|
|
if(input == "s") {
|
|
c.sort_worker();
|
|
}
|
|
if(input == "m") {
|
|
c.advance_month();
|
|
}
|
|
if(input == "f") {
|
|
c.add_files(c); //will either take in a file or write out to one
|
|
}
|
|
if(input == "q") {
|
|
keep_going = false;
|
|
}
|
|
}
|
|
}
|