The program should relate the data in each array through


Overview

In C++ the program must use the following parallel arrays:

  • empId: An array of five strings to hold employee identification numbers. 
  • The array should be initialized with the following numbers: 
  • S45601564 S15486576 S12487658 S02145673 S00154657
  • hours: An array of five Integers to hold the number of hours worked by each employee.
  • payRate: An array of five doubles to hold each employee's hourly pay rate.
  • wages: An array of five doubles to hold each employee's gross wages.

Instructions

The program should relate the data in each array through the subscripts. For example, the number in element 0 of the hours array should be the number of hours worked by the employee whose identification number is stored in element 0 of the empId array. That same employee's pay rate should be stored in element 0 of the payRate array.

The program should display each employee number and ask the user to enter that employee's hours and pay rate. Since the CCA pays hourly employees on a biweekly bases, validate that the hours do not exceed 80 hours. It should then calculate the gross wages for that employee (hours times pay rate), which should be stored in the wages array. After the data has been entered for all the employees, the program should display each employee's identification number and gross wages.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: The program should relate the data in each array through
Reference No:- TGS02356666

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)