Question: lab is designed to give you practice working with arrays in C++. 1. Create a newiual ++project using your last name and Labl1 for the

 lab is designed to give you practice working with arrays in
C++. 1. Create a newiual ++project using your last name and Labl1

lab is designed to give you practice working with arrays in C++. 1. Create a newiual ++project using your last name and Labl1 for the project (MooreN labl) and epp file name (Moorecpp). Add your name and class time to the header comments. For the lab you do not need to add further comments here but you should include inline comments and a comment with each function definition y the data file labi l txt from Canvas (Files ? 03 Lab Assignments) to your projec Then add the In the main function, declare an array called salaries that can hold 12 values of type double. code described below. For each function be sure to include the function prototype, function call statement and the function definition 3. a. Write a function called readSalaries to read in salaries from the file labl1.txt and store them in your salaries array. Declare the file variable, open, check the open success and close the file in this function Write a function called displaySalaries to display a list of the salaries stored in the array. Write another function called payRaise to give each employee a pay raise of 3 percent. For each employee, b. c. calculate the employee's new salary and replace the previous salary in the array. Call the function displaySalaries again to display a list of the new salaries. Bonus - 1 pt The data file contains salaries of employees from two locations, Cleveland and Cincinnati, d. e. with a Cleveland employee's salary first, followed by the salary of the Cincinnati employee with the same sition, the next Cleveland employee's salary and then a Cincinnati employee's salary and so on. Write a po function called totalSalaries that finds the sum of the salaries for the Cleveland employees (the salaries stored in elements 0, 2,4, etc.) and the sum of salaries for the Cincinnati employees (the salaries stored in elements 1, 3,5, etc.) as well as the total of all salaries. Print the totals with appropriate descriptions. Total salaries for cleveland employees$9999999 Total salaries for Cincinnati employees-$9999999 Total salaries for all employees

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!