Question: 5. Write a C++ program to create a batch file for twenty employees. Read name, ID, weekly hours, and rate per hour of twenty employees.
5. Write a C++ program to create a batch file for twenty employees. Read name, ID, weekly hours, and rate per hour of twenty employees. Compute gross salary. If gross salary exceed $2,500.00 then deduct 33% tax, otherwise, deduct 24% tax. Compute tax and net salary. Write weekly hours rate per hour, gross salary, tax, and net salary of all employees in another batch file. Display all information for all employees. Make sure your program does the following: Creates a file called Original.txt Types twenty employees information and saves the file Opens the Original file as a read mode Creates another file through your program and calls it Copy.txt Opens the Copy file as a write mode e Reads employee's information from Original file, one at a time Calculates gross salary, tax, and net salary Writes employee's information in the Copy file Once all records are read and written, then opens the Copy file as read mode Reads information from Copy file and displays them. Closes Original file Closes Copy file e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
