Frexly T.

asked • 10/30/20

write a program which will read in a file and produce reports as outlined.

The input file called IncomeRecord.txt contains a list of Annual income records of employees in a firm. Each record is on a single line and the fields are separated by spaces. The names of the fields are:

 Employee ID number - Integer

 Employee Last name - String

 Employee First Name - String

 Annual Income - Double


An example record may have the following form:

10001 Smith Will 30000

10002 Sivo Maika 100000

10003 Deo Amit 25000

Note: This is just sample data, there will be more records for the other employees.


1.2 Program Specifications:

Your program should be able to process the following commands. i.e. Program should provide user with the following menu.

I. Read employee data. (from file IncomeRecord.txt)

II. Print all employees’ data. (on a new Window/Form)

III. Calculate the income tax for all and store it in an array.

IV. Display the employee data including the income tax. (on a new Window/Form)

V. Exit program.


1.2.1 Explanation of each menu item.


1. Read employee data

You must create and use appropriate arrays to retrieve all the information about employees from the file IncomeRecord.txt


2. Print all employees’ data.

This menu item should open a new window/form and simply print the contents of the arrays created in suitable format on the screen. You must display all fields and records.


3. Calculate the income tax for all and store it in an array.

For this assignment, to calculate income tax, a 5% tax rate applies across the board to all income amount. A message should be displayed at the end to indicate that the calculation was completed successfully.


4. Display employee data including Income Tax.

Display the ID, last name, first name, annual income, and the income tax calculated for all employees. This information should be displayed in a new window/form.


Sample output based on the data provided above:

10001 Smith Will 30000 1500

10002 Sivo Maika 100000 5000

10003 Deo Amit 25000 1250


5.Exit Program

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.