Computer Science, asked by abc328000, 5 hours ago

In this project, you will be building 2 programs that work together. The idea is that program 1 takes the input data from the user and creates a data file that can be processed by the second program. You are required to write both programs.

A small company is moving all its employee data to a computer. To make a smooth transition, a software program will permit the data entry personnel to enter data into a file.

Program 1
Design a program that writes the employees.dat file. The program should accept user input until the user indicates there are no more records to write. The Employees file contains four fields (see the Input File Description). The program will use the employee ID as criteria to determine a current employee. Validate the employee ID and employee wage fields per the requirements below. You may use any of the library functions presented in Chapter 6 of the textbook to assist in validation. Your validation routines should include error messages and allow the user to correct an input error. Use an array to hold the valid ID numbers. The Input File Description is the same for both programs.

Process: The user has a stack of employee files from over 25 years of being in business. There are more files than current employees. The user should enter an ID number and, if the ID is valid, continue to enter the rest of that employee’s data. If the ID is not valid, then the user moves on to the next employee file. The program must support this process.

Program 1 assumptions
Employee ID: May not be more than 10 characters long. It must begin with 2 letters, and followed by up to 8 digits. For example, the following are valid IDs:

RE49762358, PR156125, OF45461, RE68566547, PR156984

Employee Wage: The number may not be zero nor larger than $45.50 (hourly rate). Number of Employees: The maximum number of employees to be processed is 1000

Program 2
Design a program that reads the contents of the employees.dat file and prints all the data within followed by statistics from the data. The data output should be formatted using he example below. The last name should print first followed by a comma, and then the first name. On the same line, the ID number should appear separated from the name by a few blank spaces (you may use TAB). Add more white space before displaying the employee’s wage. Use the EOF function to determine when the last record has been read.


The statistics that should be printed after the data that includes the highest hourly wage, the lowest hourly wage, and the average hourly wage. Remember that the maximum number of employees is 1000.




Input File Description
Note this is the format that needs to be generated by program 1. But is now the input file for program 2.

File: employees.dat


Field Description Employee first name Employee last name Employee ID # Employee Hourly Wage

Data Type String String String
Real (2 decimal places)

Attachments:

Answers

Answered by bhagialakshmi07
1

Answer:

could you please explain the question in a short waybso much to read

Similar questions