Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions