Question: Use C++ to write the following code. Bb Assignments-BCS230-Founda Microsoft Word-BCS230,182.h n C++-program for Nested Struc x C Home l Chegg.com a https://farmingdale.open.suny.edu/bbcswebdav/pid-738187-dt-content-rid-8150509 1/c 01809-BCS230-LP2-90111/BCS230
Use C++ to write the following code.

Bb Assignments-BCS230-Founda Microsoft Word-BCS230,182.h n C++-program for Nested Struc x C Home l Chegg.com a https://farmingdale.open.suny.edu/bbcswebdav/pid-738187-dt-content-rid-8150509 1/c 01809-BCS230-LP2-90111/BCS230 182_homework2.pdf AppsChrome . SignIn O Google R Blackboard Leam BOASIS Login . YouTube f Facebook Gujarat Samachar. Diya Bhaskar fotor Watch Game of Thro Microsoft Word - BCS230 182 homework2.docx 1 12 1. Define two structs dateType and employeeType. The dateType has the following members: year of type int month of int day of int The exployeeType has the following members: EirstName of string lastName of string dob of dateType salary of double 2. Assume a data file hx2data.txt contains 20 employees' data. Each line has the employee data in the order of first name, last name, year of birth, month of birth, day of birth, and salary Your program reads data from the hw2data.txt file and store them into appropriate struct variable(s). Hints: This assignment involves the use of nested structs and array of structs. 3. Define a function printEmployee that prints out one employee's complete information in the order of first name, last name, date of birth in the form of yyyy-mm-dd, and salary. In the main function, call this function to output all 20 employees' data in a neat form similar to the sample output Hints: Consider using manipulators (setw, left, right, setfil1) to format the output. 4. Find and display the average salary of the 20 employces 3. Find the oldest employee and output hisher name and year of birth Hints: Assume the oldest employee's year of birth is different from any other employees, so you don't have to compare year, then month, and day. The input data file hw2data.txt can be downloaded separately O Type here to search 2-11 PM 107/2018 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
