Question: Reading and Writing Employee Data You will write a program that reads a file that contains employee data, creates employee instances and stores those instances

Reading and Writing Employee Data

You will write a program that reads a file that contains employee data, creates employee instances and stores those instances in a Dictionary. Based on the employee data, you will need to write an Employee class that contains data about the employee.

The employee data is in a file called employees.csv. Ignore the Employee Type column. The Employeeclass should contain all the data from each row (except Employee Type).

You will need a Main program that does the file reading, creating the instances of Employee class, and generates output for the users. All the Employee instances need to be saved in a dictionary with the EmployeeNumber as a key, and Employee instance as value.

Sample Menu Output

Welcome to the Employee data processing program. Please enter the csv file path and name containing employee data: employees.csv Please enter an option: 1. Print all employees in a list 2. Create and add new employee 3. Update and change employee information 4. Remove employee 5. Save all employees in records.csv

Within each menu option there should be appropriate prompts for that flow.

Unit Test

You are expected to write two unit tests. I would like to see tests for

  • ToString method of the Employee
  • Test the constructor and the default values of the Employee instance.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!