Assignment Goals: To learn to manipulate data using structs and to enforce the skills offunctions, file input, and output formatting.Tasks:Write a program that performs the following tasks:1. Define two structs dateType and employeeType.The dateType has the following members:year of type intmonth of intday of int.The employeeType has the following members:firstName of stringlastName of stringdob of dateTypesalary of double
2. Assume a data file hw2data.txt contains 20 employees’ data. Each line has the employeedata 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 structvariable(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 theorder of first name, last name, date of birth in the form of yyyy-mm-dd, and salary. In the mainfunction, call this function to output all 20 employees’ data in a neat form similar to the sampleoutput.Hints: Consider using manipulators (setw, left, right, setfill) to format the output.4. Find and display the average salary of the 20 employees.5. Find the oldest employee and output his/her name and year of birth.Hints: Assume the oldest employee’s year of birth is different from any other employees, so youdon’t have to compare year, then month, and day.The input data file hw2data.txt can be downloaded separately.Submission: Name your source file hw2main.cpp. ONLY submit your source file via theHomework2 Submission link on Blackboard. Include the integrity statement “I certify that thissubmission is my own original work” and your name and RAM ID as comments in the source file.Extra credit: Write functions to perform task 4 and 5. You have freedom to decide what value tobe returned from your function. It is suggested that the function for 4 or 5 finds and returnsappropriate value to the main function and the result is printed out in the main function.