Question
C++ code The capability to store data for later use is a major capability in any data processing effort. Data files are: Used in a
C++ code
The capability to store data for later use is a major capability in any data processing effort. Data files are:
Used in a situation where all or the majority of the stored records are read and processed and
the order of which records being processed do not matter
All fields must be read in order to advance the "file" pointer (NOT a memory pointer)
C++ default file format uses a blank as the delimiter which has consequences for string field
data fields that have more than one word (i.e. address, product description, names that comprise
more than one word)
New records being written to the data file are stored at the end of the file
We typically do not know exactly how many records are in the data file but it is a finite number
This application will allow the user to:
1. Read from the data file
2. Write new records to the data file, field data will be manually entered from the keyboard
3. Allow the user to select records based on the number of work hours (LESS than a value entered
by the user). If NO records match the test, display NO Records found
4. The above must be done from within ONE application
5. Allow the user to run this as long as they wish
6. Use the attached data file on CANVAS (you have to download it to your USB/hard drive)
7. Field data consists of:
a. Employee ID (char array of size 10)
b. Employee Last Name (char array of size 30)
c. Employee First Name (char array of size 30)
d. Hours Worked (float) ranging from 0 to a maximum of 40 hours
e. Hourly pay rate (float) ranging from a minimum rate of $10/Hour to a maximum of
$100/Hour
f. Federal Tax Rate (float) ranging from zero to a maximum of 40%
g. State Tax Rate (float) ranging from zero to a maximum of 10%
Example Output:
Enter an Option
1 - Write new Records to the Data file
2 - Display Records From the Data file to the Screen
3 - Find ALL Employees with Work Hours LESS than "N" Hours (User enters Hours value)
4 - QUIT
Enter Your option: 2
Record #1
Employee ID: AD2201
Last Name: Pokemon First Name: Pikachu
Hours Worked: 40.00 Pay Per Hour: $12.34 Gross Pay: $493.60
Federal Taxes: $14.81 State Taxes $14.81 Net Pay: $463.98
Employee Federal Tax Rate: 3.00% Employee State Tax Rate: 3.00%
Record #2 Employee ID: AF0091 Last Name: Pokemo First Name: Squirtel Hours Worked: 35.67 Pay Per Hour: $23.54 Gross Pay: $839.67 Federal Taxes: S25.19 State Taxes $33.59 Net Pay: $780.89 Employee Federal Tax Rate: 3.00% Employee State Tax Rate: 4.00% Record #3 Employee ID: AS2333 Last Name: Tralfaz First Name: Henri Hours Worked: 34.50 Pay Per Hour: $23.45 Gross Pay: $809.03 Federal Taxes: $161.81 State Taxes $242.71 Net Pay: $404.51 Employee Federal Tax Rate: 20.00% Employee State Tax Rate: 30.00% Enter an Option 1 - Write new Records to the Data file 2 - Display Records From the Data file to the Screen 3 - Find ALL Employees with Work Hours LESS than "N" Hours 4 - QUIT Enter Your option: 1 #1 of 7-Enter Employee Worker ID Code (ie. AF123): AS772 #2 of 7-Enter Employee LAST Name: Skywalker #6 of 7-Enter FEDERAL Tax Rate: .014 #7 of 7-Enter STATE Tax Rate: .055 Enter ANOTHER Personnel record? (Y/N): n 1 records written to the data file. HIT ANY Key to Continue... The capability to store data for later use is a major capability in any data processing effort. Data files are . Used in a situation where "all or the majority of the stored records" are read and processed and the order of which records being processed do not matter" All fields must be read in order to advance the "file" pointer (NOT a memory pointer) C++ default file format uses a blank as the "delimiter, which has consequences for string field data fields that have more than one word (i.e. address, product description, names that comprise more than one word) New records being written to the data file are stored at the end of the file We typically do not know exactly how many records are in the data file but it is a finite number . This application will allow the user to 1. Read from the data file 2. Write new records to the data file, field data will be manually entered from the keyboard 3. Allow the user to select records based on the number of work hours (LESS than a value entered by the user). If NO records match the test, display "NO Records found" 4. The above must be done from within ONE application 5. Allow the user to run this as long as they wish 6. se the attached data file on CANVAS (you have to download it to your USB/hard drive) 7. Field data consists of: a. b. c. d. e. Employee ID (char array of size 10) Employee Last Name (char array of size 30) Employee First Name (char array of size 30) Hours Worked (float) - ranging from 0 to a maximum of 40 hours Hourly pay rate (float) - ranging from a minimum rate of $10/Hour to a maximum of S100/Hour Federal Tax Rate (float)-ranging from zero to a maximum of 40% State Tax Rate (float)-ranging from zero to a maximum of 10% f. g. Example Output Enter an Option 1 - Write new Records to the Data file 2 - Display Records From the Data file to the Screen 3 - Find ALL Employees with Work Hours LESS than "N" Hours (User enters Hours value) 4- QUIT Enter Your option:'2 Record #1 Employee ID: AD2201 Last Name: Pokemon First Name: Pikachu Hours Worked: 40.00 Pay Per Hour: $12.34 Gross Pay: $493.60 Federal Taxes: $14.81 State Taxes $14.8 Net Pay: $463.98 Employee Federal Tax Rate: 3.00% Employee State Tax Rate: 3.00%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