A company hired 10 temporary workers

Assignment Help C/C++ Programming
Reference no: EM13166606

A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee's weekly pay and the average salary of all the workers. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40 hours, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees, and a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week, the hourly pay rate, and the weekly pay. Your program must contain at least the following functions-a function to read the data from the file into the arrays, a function to determine the weekly pay, a function to output the names of all the employees whose pay is greater than or equal to the average weekly pay, and a function to output each employee's data. You are asked to write a program that computes each employee's weekly pay and the average salary of all the workers. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40 hours, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees, and a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week, the hourly pay rate, and the weekly pay. Your program must contain at least the following functions-a function to read the data from the file into the arrays, a function to determine the weekly pay, a function to output the names of all the employees whose pay is greater than or equal to the average weekly pay, and a function to output each employee's data.

Data.txt

Johnson 60 12.50
Aniston 65 13.25
Cooper 50 14.50
Gupta 70 14.75
Blair 55 10.50
Clark 40 18.75
Kennedy 45 20.50
Bronson 60 20.00
Sunny 65 18.75
Smith 30 9.75

C++ Microsoft Visual 2010

Reference no: EM13166606

Questions Cloud

Compute the number of units in ending inventory : Compute cost of goods available for sale and the number of units available for sale and compute the number of units in ending inventory.
You should use pure recursive calls : You should use pure recursive calls completely and count the number of calls the program makes. You should count how many times recursive calls were made.
Presume that aspartame is a molecular solid : Assume that aspartame is a molecular solid and does not ionize when it dissolves in water. Kf values are given here.
What value would be returned from call to its size() method : If a collection stores 5 objects, what value would be returned from a call to its size() method?
A company hired 10 temporary workers : A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee.
Write a select statement that columns from the products tab : Write a SELECT statement that returns these columns from the Products table
Display the date output with each field : How do you display the date output with each field on a separate line? How will you save the last two digits of the year from the date output in a variable?
What these three things(rob, rs, rsr) explain : What these three things(ROB, RS, RSR)  explain  ?
Filling all the positions of his cabinet : How many ways are there of filling all the positions of his cabinet if we assume that each position be filled by a different person and do not take into account which position each been has been assigned?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Enter the temperature at noon of each of the five days

Write a program that allows each employee to enter the temperature at noon of each of the five days and displays the highest, lowest, and average (mean) temps.

  Describe the process replace a do...while loop with an equiv

Describe the process you would use to replace a do...while loop with an equivalent while loop. What problem occurs when you try to replace a while loop with an equivalent do...while loop? Suppose you have been told that you must remove a while loop a..

  Write a program to crypt its input accordingly

Write a program to crypt its input according to a specified transformation scheme

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  Base process which communicate with child processes

Write a program which has a "base process" which communicates with child processes acting as "bombers" that it creates.

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Create a graphical (not text-based) visual c++ program

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  Write a script that creates a craps game

Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6.

  Function odd_fill() that fills all integers between two poin

write a function odd_fill() that fills all integers between two pointers, first and last, with a sequence of odd integers: 1,3,5,7

  Businesspartner class that contains a first name

Create a BusinessPartner class that contains a first name, company name, and a telephone number. Create a Contacts class that contains a dynamically allocated array of BusinessPartners as well as the owner's name and cell phone number.

  Bare in mind this is a program

Bare in mind this is a program with the audience being lawncare and landscaping people. So the events will generally be to know how often a client wants their lawn mowed.

  Prepare a program that uses at least two functions

Prepare a program that uses at least two functions that can be called from your main.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd