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.

hourly.cpp 462B

12345678910111213141516171819
  1. #include "hourly.h"
  2. #include "employee.h"
  3. using namespace std;
  4. hourly::hourly(string name, double pay_rate, int hours, string type) : employee(name, pay_rate, hours, type) {}
  5. int hourly::get_salary() {
  6. int salary;
  7. int overtime;
  8. if((hours - 170) > 0) {
  9. overtime = (hours - 170);
  10. salary = 170 * pay_rate;
  11. salary += overtime * (pay_rate * 1.5);
  12. return salary;
  13. }
  14. salary = hours * pay_rate;
  15. return salary;
  16. }