Question: using C . . 1. Design and implement the following: a) Start by writing a complete pseudocode or algorithm (describing the steps that you will


. . 1. Design and implement the following: a) Start by writing a complete pseudocode or algorithm (describing the steps that you will need to perform for the program described below). This must include sufficient details that would allow you to write the c code directly. A txt file or c file with comments will suffice. b) Most universities have different types of employees. Let's assume that our hypothetical university has only three categories of employees: Administrators and Staff (who receive a fixed monthly salary over 12 months). Administrators do not get overtime pay but staff members do. Staff can't work more than 10 hours of overtime per month Their overtime hourly salary is 75% of their regular hourly salary. Faculty includes regular faculty (tenure-track, non-tenure track) and non-regular faculty (adjuncts and teaching assistants). Regular faculty are paid their annual salary over 10 months. Non-regular faculty are paid on per course basis and SICE pays $8500 for teaching a 3-credit hour course. A teaching assistant gets $2500 to help with a course and usually works 10hrs per week only. Salary of non-regular faculty is paid over 5 months. There is no overtime pay for teaching faculty (i.e., regular faculty and adjunct) but they can teach one extra 3-credit hours course per semester. This extra teaching is paid in the same manner as an adjunct faculty. On the other hand, teaching assistants may get overtime pay. Their overtime hours cannot exceed more than 2 hours per week and the overtime payrate is same as their hourly payrate. If they work more than 2 hours per week, they won't be paid for extra hours. Hourly workers receive a fixed hourly wage for up to the first 20 hours they work and "time-and-a-half- i.e., 1.5 times their hourly wage - for overtime hours worked. They will only be paid for a maximum of 40 hours of work each week (and any additional work is not paid) Remember that a typical work week has 40 hours. o Write a program that prompts the user to enter the appropriate employee code along with needed information (see below) and computes the requested information for different workers. In your testing, make sure to choose at least 1 worker from each type and make sure that different scenarios are properly testie., no over time, too much over time, faculty teaching no extra course or some extra courses, multiple courses for adjuncts or TAS, etc. Each type of worker has its own pay code: Administrators have paycode 'A': Staff have paycode 's'; Regular faculty have paycode 'R: Adjunct have paycode 'J': Teaching assistant have paycode 'T'; and Hourly worker have the paycode 'H'. Prompt the user (i.e., the payroll clerk) to enter the employees pay code and appropriate data (i.e., salary, hours worked, overtime hours, number of courses, etc.) in the following manner: O A 100000 l"An administrator makes 100k per year */ S 40000 8 /"Staff member makes 40k per year but worked 8 hours of overtime this month *7 o R 80000 4.5/"Regular faculty salary is 80k and taught 4.5 credit hours extra o J 6/"An adjunct is teaching 6 credit hours this semester / O T2 50 /*A teaching assistant is helping with 2 3-credit hour courses and worked 50 hours extra for both courses combined o H 10 70 /* An hourly employee makes $10 per hour and worked 70 hours every week of this month */ The program should start by prompting the user to enter the appropriate paycode first along with the appropriate information (as given above). [Note: You can input values of type double using the conversion specifier %lf with scanf. Then it should prompt the user again to choose the paycode for which he/she wants to review the calculated information. Print weekly and monthly salary received for selected employee and their hourly salary rate. You MUST use a switch statement in your code which may be used when computing each employee's salary information based on that employee's paycode or displaying the menu. Remember that the overtime salary is not counted in salary rate and there should not be any need to prompt the user to provide any more information. ho Also, only acceptable paycodes are 'A', 'S', 'R', 'J', 'T', 'H' and 'Q'. These choices must be case sensitive. You may want to show a 'MENU' like option which prompts the user to repeat the process by entering the appropriate paycode or quit the program. User may enter 'Q' to quit the program. Any other choice should display the menu again (as mentioned above) If user selects 'Q' (which should be done after the information for employees from different categories are displayed), display the following statistics from your university and quit the program: Average weekly and monthly salary for all three types of employee Average pay rate for all three types of employee Note 1: Loops can be written using 'while', 'for' and 'do-while' statements. For this problem, you must not use same loop statement more than once (For example: if you have to use double nested loop, you can't use for' loop inside a for' loop. It has to be a 'for' loop inside a 'while' or vice versa or some other combination) Note 2: Each time you display the salary information, show the menu again. Notice that there will be no other way to stop the program until user enters
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
