adding cs142 code
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#include "salaried.h"
|
||||
#include "employee.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
salaried::salaried(string name, double pay_rate, int hours, string type) : employee(name, pay_rate, hours, type) {}
|
||||
|
||||
int salaried::get_salary() {
|
||||
if(hours > 170/2) {
|
||||
return pay_rate;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user