Three employees in a company are ups for a special pay increase. You are given a file; ABCompany.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%.
Three employees in a company are ups for a special pay increase. You are given a file; ABCompany.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%.
Chapter13: File Input And Output
Section: Chapter Questions
Problem 10PE
Related questions
Question
Three employees in a company are ups for a special pay increase. You are given a file; ABCompany.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%.
- Write a JAVA program that reads the data from the specified file and stores the output in the file ABCoutput.dat.
- For each employee, the data must be output in the following form: firstname lastname updated salary.
- Format the output of decimal numbers to two decimal places.
Send a copy of the following:
- Softcopy of the running code
- Screenshot of the code
- input file
- output file
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning