Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE PROGRAM IN C AND NOT IN C++ PLEASE PROGRAM IN C AND NOT IN C++ Submit your .c (preferred) or.cpp solution file on Blackboard

PLEASE PROGRAM IN C AND NOT IN C++

image text in transcribedimage text in transcribedimage text in transcribed

PLEASE PROGRAM IN C AND NOT IN C++

Submit your .c (preferred) or.cpp solution file on Blackboard Objective: Using basic I/O Systems calls open, close, read, write An entrepreneur operating a day labor pool, divides his workers into three skill levels. Their skill level, hourly wage rates are shown in the table below: Skill LevelWage/Hour $ $8.15 12.55 $18.60 Any of the workers (by regulation) cannot work more than 12 hours per day. Any worker works more than 8 hours per day receives 1.5 times the rate per hour for hours worked over 8 Each employee is identified by a unique employee number. Information per worker (employee number skill level and number of hours worked) is saved in the memory in a record structure as shown below struct employee_wagef int employeenumber char skill_level; double number_of_ hrs; Employee information is stored in a binary file of employee wage records, so in the binary file you will be saving three information elements per employee. They are in a record that will look like this: Emp Skill Hrs num Level Wrkd num Level Wrkd num Level Wrkd 34516 M 11.545576 S mp Skil HrsEmp Skl Hrs You must write a menu driven C/C++ program so that the user is asked to enter a choice R. Read employee wage W. Write employee wage You start the program with a menu like this: MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here -R User Selects Option R: if the user enters R, ask for the employee number like this: Enter Employee Number To Read-34516 Then search the file for the record containing the employee number 34516. If the record is found, print the found employee's wage information as shown below nter Employee Number 10 Kead-> Employee Number-34516 Employee Skill Level - M Employee Hours Worked-11.50 Total Wage $166.29 b If the employee number is not found, that means there is no record. Print a message such as Enter Employee Number To Read -45875 Employee Number-45875 not found User Selects Option W: if the user enters W, ask for the employee number followed by other information (Hours worked and Skill Level) and as shown below ter E ployee Number- 59964 Enter hours worked-> 9.3 Enter Skill Indicator (U/u, M/m, S/s)-> U Total Wage $81.09 Record Successfully Written After entering the data, the Total Wage is printed with a Ssign, then fill a record of type struct employee_wage, and then write the record to the file User Selects Option Q: if the user enters Q, Quit the program. Write a C/C++ program that calculates workers daily to two decimal places. Test your program for an input of odd, even and fractional hours. Your program input should consist of the hours worked and skill level indicator. The program should run continuously until terminated by the operator, at which time the sum of all wages paid that day should be displayed. oun Use this Scenario to Test your Final Output MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here-> W 5. MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here ->R 1. Enter Employee Number-> 34516 Enter hours worked-> 11.5 Enter Skill Indicator (U/u, M/m, S/s)-> M Total Wage $166.29 Record Successfully Written MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here-> W Enter Employee Number To Read ->34516 Enter hours worked: 11.5 Enter Skill Indicator: M Total Wage $166.29 2. 6. MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here ->R Enter Employee Number-> 45576 Enter hours worked-> 8 Enter Skill Indicator (U/u, M/m, S/s)-> S Total Wage $148.80 MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here-> W Enter Employee Number To Read -> 18883 Enter hours worked: 10.0 Enter Skill Indicator: U Total Wage $89.65 MAIN MENU R. Read employee wage W. Write employee wage Q. Quit Enter Option Here ->R 3. 7 Enter Employee Number-> 18883 Enter hours worked-> 10.0 Enter Skill Indicator (U/u, M/m, S/s)-> U Total Wage $89.65 Enter Employee Number To Read-> 56728 Enter Employee Not Found

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

Budgets are wonderful vehicles for communication. Comment

Answered: 1 week ago