I have a horrible professor and he gave us this assignment and I absolutely can't do it it's more difficult than the others.
1) Write the definition of the function getHoursRate that prompts the user to input the hours worked and rate per hour to initialize the variables hours and rate of the function main.
2) Write the definition of the value-returning function payCheck that calculates and returns the amount to be paid to an employee based on the hours worked and the rate per hour. The hours worked and rate per hour are stored in the variables hours and rate, respectively, of the function main. The formula for calculating the amount to be paid is as follows: For the first 40 hours the rate is the given rate; for the hours over 40, the rate is 1.5 times the given rate.
3) Write the definition of the function printCheck that prints (displays) the hours worked, rate per hour, and the salary.
4) Write the definition of the function main that tests each of these functions.
These are the instructions can you guys please help me write the code? I think I am supposed to use multiple functions and maybe void functions?
Thanks a lot guys