Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

my language is C program NOT C++ program Create a comprehensive C program that reads data from a file containing information about employees some company

my language is C program NOT C++ program

Create a comprehensive C program that reads data from a file containing information 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 bonus Salary for Employee, the bonus salary depends on the following roles:

o If the amount of overtime hours is less than a quarter of the total number of hours worked, the hourly wage is $8.

o 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.

o If the employee work more than half of original work hours, the wage per hour is 15$.

- 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

o If the Employee Married he will got 35$ for his family, and 15 $ for each child.(this wage refer to Others in equation).

o Total Salary = base Salary + bonus salary+ others.

o 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:

play the following menu to the user: o Upload record for new Employee press 0.

o Sort the Employees based on EmpId press 1.

o Sort the Employee info based on basic salary press 2.

o Sort the employee info based on total salary press3.

o Sort the employee info based on first name press 4

o To display total salary for employee based on id press 5.

o To find the average salary for all employee press6.

o To find the average salary for Male Employee press7.

o To find the average salary for female press8.

o To exit press 9.

The program should keep displaying the menu until the user selects to exit from the program.

my language is C program NOT C++ 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

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions

Question

Can you translate this c + + code into assembly language

Answered: 1 week ago