Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a comprehensive C program that reads data from a file containing infomation about employees some company unknowable staff count. Employee Full Name, Employee ID,

image text in transcribed
Create a comprehensive C program that reads data from a file containing infomation about employees some company unknowable staff count. Employee Full Name, Employee ID, Address, Educational Level, Social Status, Number of Chilled, Employee Basic Wage, and number of overtime hours per month. The program should do the following: - Using the concept of Parallel Array, create record of employee using the above attributes. (You can use Struct to do this option) - The created attributes must have new attribute refers to bonts Salary for Employee, the bonus salary depends on the following roles: If the amoum of overtime hours is less than a quarter of the total number of hours worked, the hourly wage is $8. A wage of $12 per hour is paid if the number of overtime hours is greater than a quarter but less than half of the total number of hours worked. If the employee work more than half of original work hours, the wage per hour is 155. - Update the records of each employee by adding bonus salary based on above equation. - The User required to Input File Name to read information from the file, you must declare an array of chars to receive name of file, which will be used in the read and write to file functions. - Read the data from the file and store it in record for employees, which has IDs, Names, and Salaries. The ID should be declared as integer. full name of type string (array of characters) and the salary as double. Assume that the maximum length of full name of any employee is 50 characters. - Calculate the Total Salary based on the following. If the Employee Married he will got 355 for his family, and 155 for each child.(this wage refer to Others in equation). Total Salary = base Salary + bonus salary+ others. Hint: read form file, calculate the total salary, and store it in the record before going to the next step. - Display the following menu to the user: - Upload record for new Employee press O. Sort the Employees based on Empld press 1 . Sort the Employee info based on basic salary press 2. Sort the employee info based on fotal salary press3. Sort the employee info based on first name press 4 To display total salary for employee based on id press 5. To find the average salary for all employee press 6. To find the average salary for Male Employee press7. To find the average salary for female press8. To exit press 9. The program should keep displaying the menu until the user selects to exit from the program

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

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago