Reference no: EM132598338
OBJECTIVE
(a) To review and strengthen concepts about linked lists through an application development.
(b) To review techniques of dynamic data structure creation and manipulation.
DESCRIPTION OF PROJECT:
In this project, you need to write the functions given in the main() that will store and manage student information in FICT using linked lists. Three classes have been created, which are Student class, Exam class and Subject class. Student class is used to store student information and the Exam class is used to store information for past exam for a student in a trimester. The Subject class is used to store information for a subject taken by student. Refer to the Figure1.doc given for the representation of the types of linked list that you are going to create. Below are the details for each of the classes:
Tasks:
You need to write the following functions in main().
1. Write a function bool BuildStuList(char *filename, List *list) to read student information from a file and store in a linked list. Ensure there is no duplicate record of student stored in the list. The function will return true if successfully read and false otherwise. A sample of the textfile is in "student.txt".
2. Write a function bool DeleteRecord(List *list, char *id) to delete a student from the linked list based on student id. The function will return true if successfully delete and false if student cannot be found in the list.
3. Write a function bool Display(List list, int source) that will display information to the screen. Function return false if list is empty and true otherwise. The source variable will indicate whether to display to screen (source = 1) or file (source = 2). If write to file, use the filename "student_result.txt" to write. A sample of each of the output option is given in text file in folder sample output. If the student's exam_cnt = 0, then print "THIS STUDENT HAVEN'T TAKEN ANY EXAM YET". You can design your own output format but the necessary details must be there.
4. Write a function bool InsertResult(char *filename, List *list) to insert student exam result to the linked list. Open the file with filename and read every record and find the student to insert the exam based on their id. A sample of the text file is in "exam.txt". Read every record in the file and put the exam info in an exam struct variable. Then find the correct student based on id to insert the exam struct variable. You need to calculate the current cgpa every time you insert a new exam to a student.
5. Write a function bool getAverageCGPAByCourse(List list) that will computes the average CGPA in the student list list according to course. The function will print the average CGPA, number of students that are above or equal to the average in variable above and number of students that are below average in variable according to course. A sample output is shown below. The function will return false for empty list and true otherwise.
6. The function bool filterStudent(List list1, List *list2, char *course, int year, int totalcredit) that will filter student in list1 according to course, year and totalcredit earned. For example, if the value pass in for course = "CS", year = 2018 and totalcredit = 30, you need to traverse list1 to find all CS students that are enrolled in 2018 and the totalCreditsEarned is >= 30. If a student fulfills all the three conditions, then insert to list2. You can extract the year enrolled from the student id where the first 2 digits represent year enrolled (e.g.: if id is 1600345 then year enrolled is 2016). Call Display function in main after function call to display list2 content to screen. The function will return false if list1 is empty or list2 not empty. Otherwise, return true. (Note: list1 content will remain the same after function call)
7. Write a function bool findEligibleFYPStudent(List list1, List *FYPlist) that will identify student that can register for FYP (Final Year Project). A student is eligible to register for FYP if he/she has earned at least 30 credits hours and the student has taken and passed (must obtain at least grade C) UCCD2502 Introduction to Inventive Problem Solving and UCCD2513 Mini Project. Call Display(FYPlist, 1) in main() after function call to display FYPlist. If FYPlist is empty print message "There is no student that is eligible to take FYP". Assume that list FYPlist is empty when pass to function and list will not be changed after function call. The function will return false for empty list1 and true otherwise.
8. Write a function bool identifyGoodPoorStudent(List list1, List *goodList, List *poorList) that will identify student with good result and poor result in list1. A student is considered to have good result if he/she can get gpa >= 3.50000 for at least 3 trimesters in all the exams and CGPA >= 3.50000 and no fail subject. A poor student is a student that get gpa <= 2.0000 for at least 3 trimester and CGPA <= 2.0000. Copy all the good result students to list goodList and all the poor students to list poorList. Call function Display(goodList, 1) and Display(poorList, 1) in main() to print goodList and poorList in the screen after calling the function. Assume goodList and poorList are empty when pass to function and list1 content will not be changed after function call. If either the goodList or the poorList is empty after function all, then print message "There is no student in good list" or "There is no student in poor list". The function will return false for empty list1 and true otherwise. (Note: If a student has taken < 3 exams then no need to check if the student belongs to good or poor list.)
9. Write a int menu() function that contain menu with choice from 1 to 9 above to let user choose that task. Function will return the choice chosen. Make sure user can continuously choose for the menu until exit choice is chosen. Sample menu is displayed below:
1. Read file
2. Delete record
3. Insert past exam result
4. Display Output
5. Get Average CGPA By Course
6. Filter Student
7. Find Eligible FYP Student
8. Identify Good and Poor Result Student
9. Exit.
Note: Need only question 1,3,5 and 7.
Attachment:- Data Structures And Algorithmic Problem Solving.doc