Contains the source code from the course work throughout my undergraduate Computer Engineering degree at Brigham Young University. There is a mixture of Go, Python, C, C++, Java, VHDL, Verilog, Matlab, Bash, Assembly, etc..
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include <iostream>
  2. #include <fstream>
  3. #include "employee.h"
  4. #include "salaried.h"
  5. #include "hourly.h"
  6. #include "faculty.h"
  7. #include "administrator.h"
  8. #include "util.h"
  9. #include "campus.h"
  10. using namespace std;
  11. int main() { //driver for program
  12. campus c = campus();
  13. bool keep_going = true;
  14. while(keep_going) {
  15. string input;
  16. cout << "(a)dd worker, (r)emove worker, (d)isplay worker, add (h)ours, \n";
  17. cout << " (s)ort workers, advance (m)onth, add (f)ile, (q)uit" << endl;
  18. cin >> input;
  19. cin.ignore();
  20. if(input == "a") {
  21. c.add_worker();
  22. }
  23. if(input == "r") {
  24. c.delete_worker();
  25. }
  26. if(input == "h") {
  27. c.set_hours();
  28. }
  29. if(input == "d") {
  30. c.display_worker();
  31. }
  32. if(input == "s") {
  33. c.sort_worker();
  34. }
  35. if(input == "m") {
  36. c.advance_month();
  37. }
  38. if(input == "f") {
  39. c.add_files(c); //will either take in a file or write out to one
  40. }
  41. if(input == "q") {
  42. keep_going = false;
  43. }
  44. }
  45. }