cout << "Now enter your performance score" << endl;
cin >> performanceScore;
// Enter your code here
cout << "Your salary raise is: $" << salaryRaise<<endl;
system("pause");
return 0;
}
In the remaining exercises you’re to complete the above program to achieve the following results:
• full-time employees get $500.00 raise plus 4% of their current salary if their performance score is 8 or above and 2.5% if their performance score is below 8 but greater or equal to 6
• part-time employees with performance score of 8 or above get a raise equal to 3% of their current salary while those with a performance score below 8 but greater or equal to 6 get a 1.5% raise.
• no raises are given in any other cases.
Exercise 1. Based on the above specifications, list all the possible cases of employee status and performance score. Generate a test data set (list test data points with expected outcome for each)
its not even a code question to start. And this is a GREAT question, one of the few I have seen from students lately that taught something meaningful.
LIST the possible cases from the requirements. This is CRUCIAL to know how to do in real, get paid for it as a job programming. No programming required at all.
Once you have the above, make up a set of values (here, employee type (full or part) and performance score value ) that fall in each of the listed categories. No code needed here either.
Can you do this? Excel/spreadsheet might help you do this, but its not required.
looks like
employee status | perf score | output | example perfscore
full time | >= 8 | 500+ 1.04*current_pay | 10
… fill in more rows like this (this answers both needs, full time / 10 is an example input, and the rest of it is what the rule is)