Recursive Linked List Solution

$30.00 $24.90



I <name> have not used any code other than my own (or that in the textbook) for this project. I also have not used any function or data-structure from the Standard-Template Library. I understand that any violation of this disclaimer will result in a 0 for the project.

Purpose: To better understand

Linked lists Recursion

You will write an application which stores the courses taken by a student. You will design a Course class which will contain at least:

Course Number Course Name Credits

Grade (numeric GPA style 4.0 – 0.0)

The courses taken by the student will be provided in a data file. That file will need to be copied to C:\CS2420\Assignment2\data.txt on your computer. You will have to parse the data from that file and add it to a Linked List of courses.

Your Linked List class must be designed to hold an unlimited number of Course objects. All new Course objects are to be inserted in the list maintaining list order. (Ordered by Course Number).

There can be NO LOOPS of any type in the Linked List class. Recursion MUST be used here.

Once all data has been read from the data.txt file and the resulting Course objects inserted into your linked list, you must print out the list of courses using a PrintList() function from you Linked List object. Again, this function must use NO LOOPS; recursion only to print the entire list. The PrintList() should first print the size of the list using your recursive size() function.

After the list of courses has been printed, you should then calculate and display the cumulative GPA of all courses in the list. Again recursion must be used here instead of loops.

Sample Output:

When the program completes, all courses should be properly deleted from the Linked List; again using only recursion.