In this project, you are to implement a database.The database shows the students registered in different courses.The database will only include the student’s first name, last name, ID, list of courses, credit hours for each course, and the course grade.You are to calculate the GPA for each student.The GPA is calculated by multiplying the credit hours (which is given below for each course) by the grade value (A=4.0, B= 3.0, C=2.0, D=1.0, and F=0) for each course.Then you calculate the sum of the GPA for all the courses and divide it by the total credits of all the courses.
A sample of student’s information is listed below.
You will save all the information below in an input file called “SeniorClass”.
You will read from the file to perform the operations listed below.(The input file is attached)
Display a Menu, so the user would be able to select any of the following operations:
Sort (Based on Last name, First name, GPA)
Your program should include all the following functions:
CreateClassList:Reads the student’s information from the input file and place all student’s names along with their information in a linked list, in alphabetically order, by last name.Call the print functionafter you create the list.
InsertNewStudent:Will insert a new student into the class, along with allthe student’s information as: first name, last name, ID, course name, credits, and grade, in the proper location in the list sorted alphabetically by last name.After insertion, you should show the count of the class.Then print the list after you insert.
AddCourse:You should be able to add a new course given the student’s name or ID, make sure to do all the necessary updates once you add a course.
DeleteStudent:You should be able to delete the student’s record, once you enter student’s first name followed by last name, or by using the student’s ID.If the student is not registered in the class, a message should appear indicating that the student is not registered.Show the count of the class after deleting.Then print the list after you delete. If any students have same first name and same last name, then you will have to delete by ID.
DeleteCourse: You should be able to delete any of the courses a student is registered in.To do so, you will have to ask for the student’s name or ID, and the course that needs to be deleted.Make sure to do all necessary updates after the deletion.
FindGPA: Calculates the GPA for any student by multiplying the credit hours (which is given below for each course) by the grade value (A=4.0, B= 3.0, C=2.0, D=1.0, and F=0) for each course.Then you calculate the sum of the GPA for all the courses and divide it by the total credits of all the courses.
Sort:You should be able to sort the list by first name, GPA, and ID.You could use any sorting algorithm.Then print the list after you sort.You should ask the user how you want to sort, either by first name, orGPA, or ID.When you print, you will have to use a different print function than the one described below, because the one below prints the names sorted alphabetically by last name.
Search:By giving the student ID, you should be able to search for that student in the list.You should return the student’s first name, last name, ID, GPA,and the courses registered. If the student is not found in the list, you should print a message indicating so.
Modify:You should be able to modify the student’s grade .So you should be able to ask the user for the student’s name or ID, then ask what course grade needs to be modified. You should show update the student’s information and print the updated student’s information.
HonorStudent:Prints the number of students and names ofstudents whose GPA is greater than 3.6.
WarnStudent:Prints the number of students and the names of the students whose GPA is less than 2.5.
FailStudent:Prints the names of students whose GPA is less than 2.0
Print: Prints all the students information alphabetically, sorted by last name, and the total number of students in the class.