Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

Students also viewed these Databases questions

Question

D How will your group react to this revelation?

Answered: 1 week ago