Question: Implement a single link list with the following data and methods. public class LNode { int STDnum: string STDname: double gpa: LNode next: public ListNode(int

 Implement a single link list with the following data and methods.

Implement a single link list with the following data and methods. public class LNode { int STDnum: string STDname: double gpa: LNode next: public ListNode(int stdnum, string sname, double sgpa, sLNode snext) { STDnum = stdnum: STDname = sname: gpa = sgpa: Next = snext: } } Write the methods: 1. Add a student: input all the data variables from the user. Add the student at the end of the list. Handle all the possible cases for addition. 2. Remove the student from the end of the list. Handle all possible cases for deletion. 3. Print the traversal of the existing list. 4. Print the size of the list. Modify the Add and Remove methods in question 1 such that: a. Add a student anywhere in the list at the user specified index b. Remove a student anywhere in the list at the user specified index. Modify the list in Q1 to a doubly link list by adding LNode prex: And inplement the methods in Q1 and Q2 according to that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!