write in c++
This lab will exercise your understanding of some of the concepts covered in Chapter 9:
1. Create a file that contains 3 rows of data of the form:
First Name Middle Name Last Name Month Day Year Month Day Year GPA.
This file represents student data consisting of first name, middle name, last name, registration month,
registration day, registration year, birth month, birth day, birth year, current gpa.
...or you may download the data file inPut.txt.
Create a program that:
2. Declares a date structure consisting of month, day, year.
3. Declares a structure containing student data: first name, middle name, last name, gpa, registration
date using the date structure previously declared and birth date using the date structure
4. Places the function prototypes and structures in a header file (*.h). Include the header file in the
5. Declares an array variable of the student structure that can hold 3 students.
6. Opens the file. Write code to check the file state. If the file fails to open,
display a message and exit the program.
7. Write a function that accepts the file pointer and structure array as parameters and reads each
row into the structure.
8. Write a function that accepts the array structure as a parameter. Ensure the array cannot
be modified in the function. Output the data in the structure using appropriate labels and
messages. Ensure the data is readable.
9. Call both functions from main.