Summary Three employees in a company are up for a special pay increase. You are given a file, say Ch3_Ex5Data.txt, with the following data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 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 65789.87, and the pay increase is 5%. Instructions Write a program that reads data from a file specified by the user at runtime (i.e. your progra should accept the filename as user input) and stores the output in the file Ch3_Ex5Output.dat. To test your program, use the Ch3_Ex5Data.txt file. Your program will not pass all checks if it does not accept a filename as input from the user For each employee, the data must be output in the following form: firstName lastName updatedSalary. Format the output of decimal numbers to two decimal places. Since your program handles currency, make sure to use a data type that can store decimals Grading When you have completed your program, click the Submit button to record your score.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
#include <iostream>

using namespace std;

int main() {
    // Write your main here
    return 0;
}
Ch3_Ex5Data.txt
main.cpp
1 Miller Andrew 65789.87 5
2 Green Sheila 75892.56 6
3 Sethi Amit 74900.50 6.1
4
+
Transcribed Image Text:Ch3_Ex5Data.txt main.cpp 1 Miller Andrew 65789.87 5 2 Green Sheila 75892.56 6 3 Sethi Amit 74900.50 6.1 4 +
Programming Exercise 3-5
Instructions
¥3
ا
</>
Summary
Three employees in a company are up for a special pay increase. You are given a file, say
Ch3_Ex5Data.txt, with the following data:
Miller Andrew 65789.87 5
Green Sheila 75892.56 6
Sethi Amit 74900.50 6.1
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 65789.87, and the pay increase is 5%.
Instructions
Write a program that reads data from a file specified by the user at runtime (i.e. your program
should accept the filename as user input) and stores the output in the file
Ch3_Ex5Output.dat. To test your program, use the Ch3_Ex5Data.txt file.
Your program will not pass all checks if it does not accept a filename as input from the user.
For each employee, the data must be output in the following form: firstName lastName
updatedSalary.
Format the output of decimal numbers to two decimal places.
Since your program handles currency, make sure to use a data type that can store decimals.
Grading
When you have completed your program, click the Submit button to record your score.
Transcribed Image Text:Programming Exercise 3-5 Instructions ¥3 ا </> Summary Three employees in a company are up for a special pay increase. You are given a file, say Ch3_Ex5Data.txt, with the following data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 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 65789.87, and the pay increase is 5%. Instructions Write a program that reads data from a file specified by the user at runtime (i.e. your program should accept the filename as user input) and stores the output in the file Ch3_Ex5Output.dat. To test your program, use the Ch3_Ex5Data.txt file. Your program will not pass all checks if it does not accept a filename as input from the user. For each employee, the data must be output in the following form: firstName lastName updatedSalary. Format the output of decimal numbers to two decimal places. Since your program handles currency, make sure to use a data type that can store decimals. Grading When you have completed your program, click the Submit button to record your score.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Does not give me the correct data outcome

2.50
out of
10.00
Ch3_Ex5Output.dat is generated with correct
the data. Run this task first.
Checks
2 out of 5 checks passed. Review the results
below for more details.
Test Case Complete
Run the program to produce Ch3_Ex5Output.dat
Code Pattern. Incomplete
Check Ch3_Ex5Output.dat for correct data, line 1
Code Pattern. Incomplete
Check Ch3 Ex5Output.dat for correct data, line 2
Code Pattern. Incomplete
Check Ch3_Ex5Output.dat for correct data, line 3
Code Pattern Complete
Did not hard code values into the program
Transcribed Image Text:2.50 out of 10.00 Ch3_Ex5Output.dat is generated with correct the data. Run this task first. Checks 2 out of 5 checks passed. Review the results below for more details. Test Case Complete Run the program to produce Ch3_Ex5Output.dat Code Pattern. Incomplete Check Ch3_Ex5Output.dat for correct data, line 1 Code Pattern. Incomplete Check Ch3 Ex5Output.dat for correct data, line 2 Code Pattern. Incomplete Check Ch3_Ex5Output.dat for correct data, line 3 Code Pattern Complete Did not hard code values into the program
4.00
out of
10.00
Ch3_Ex5Output.dat
correct data. Run this task second.
is generated with the
Checks
3 out of 6 checks passed. Review the results
below for more details.
Test Case Complete
Run the program to produce Ch3_Ex5Output.dat
Code Pattern Incomplete
Check Ch3_Ex5Output.dat for correct data, line 1
Code Pattern Incomplete
Check Ch3_Ex5Output.dat for correct data, line 2
Code Pattern Incomplete
Check Ch3_Ex50Output.dat for correct data, line 3
Code Pattern Complete
Did not hard code values into the program
Code Pattern Complete
Did not hard code the output into
Ch3_Ex5Output.dat
>
Transcribed Image Text:4.00 out of 10.00 Ch3_Ex5Output.dat correct data. Run this task second. is generated with the Checks 3 out of 6 checks passed. Review the results below for more details. Test Case Complete Run the program to produce Ch3_Ex5Output.dat Code Pattern Incomplete Check Ch3_Ex5Output.dat for correct data, line 1 Code Pattern Incomplete Check Ch3_Ex5Output.dat for correct data, line 2 Code Pattern Incomplete Check Ch3_Ex50Output.dat for correct data, line 3 Code Pattern Complete Did not hard code values into the program Code Pattern Complete Did not hard code the output into Ch3_Ex5Output.dat >
Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY