1. Create the class student that includes the following information about studen
ID: 3641976 • Letter: 1
Question
1. Create the class student that includes the following information about student: name, age and gpa.Write the following members functions:
(a) Constructor that creates objects of the student class.
(b) read that prompts the user to enter from the keyboard student name, age and gpa.
To terminate reading the user should enter the EOF (ctrl-D in Unix and Ctrl-Z in
DOS).
(c) show that displays on the screen student name, age and gpa.
(d) writefile that writes a record (name, age, gpa) into the file student.dat.
(e) getgpa that returns gpa of the student.
(f) readfile that reads the student record from the file student.dat .
Write a main program that demonstrates the work with this class. Declare all necessary objects and variables. Using read and writefile create the student.dat. After closing the file student.dat reopen it for reading. Read and display all students from the file and compute and display the average gpa for all of them.