Question: Please answer the following question with C++ code. Comments are helpful. The purpose is to practice working with vectors of structs. Write a program that

Please answer the following question with C++ code. Comments are helpful. The purpose is to practice working with vectors of structs.  Please answer the following question with C++ code. Comments are helpful.

Write a program that determines the net income for several employees. The program should create a structure, Employee, with the following data: struct Employee string name; long SSN float grossIncome float taxes The program should then create a vector of Employee structs, called Employees. Your program should have functions to: Read the data from a data file "employeeData.txt" into the vector Employees. Determine the net income for a given Employee Print all personal and income information for every Employee in the vector You may use the following "employeeData.txt" file Tom 335234567 45000 0.19 Nancy 234761344 60000 0.23 Bi11 908769100 12000 0.01 Jack 669234356 104000 0.3 Emily 123439898 50000 0.22 Your program should print something like this: Name SSN GrossIncome Taxes NetIncome Tom Nancy Bi11 Jack Emily 35234567 234761344 908769100 669234356 12343989 45000 60000 12000 104000 50000 8550.00 36450.00 3800.00 46200.00 20.00 11880.00 1200.00 72800.00 11000.00 39000.00

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!