Question
Three employees in a company are up for a special pay increase. Create a file named salaryInfo.txt that has data in the following format (but
Three employees in a company are up for a special pay increase. Create a file named salaryInfo.txtthat has data in the following format (but with different names and values):
Each input line consists of an employee's last name, first name, current salary, and percent pay increase. For example, in the first input line, the last name of the employee is Miller, the first name is Andrew, the current salary is $65,789.87, and the pay increase is 5% (or 0.05).
Write a program in RaiseCalculator.cpp that reads data from a specified file and stores the output in a new file. For each employee, the data must be output to a new file named salaryUpdated.txt in the following form: lastName firstName updatedSalary. Format the numerical output to two decimal places.
One example txt file needed for this problem is attached. Your code should not only work for this particular txt file, but also for any 3-line txt file in this format and named salaryInfo.txt. Create multiple txt input files (salaryInfo1.txt, salaryInfo2.txt, etc.) to be used to test your code (rename them to salaryInfo.txt to test them). Make them only 3 lines in length and similar in format to the example txt file. Rework your code as needed.
Create a testResults.txt with a short paragraph explaining the results of your tests and if/how you changed your code after testing.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started