Question: C ++ language The class PList is a linked unsorted list that has the attributes of head which points at the first node on the

C ++ language

The class PList is a linked unsorted list that has the attributes of head which points at the first node on the list, pos which is a position pointer (of node type). Each node is made up as a struct with the item info (of item type) and a pointer next which points at the next node.

  1. (15 pts) Write a method that will advance the pos pointer to the next node and return info.
  2. (15 pts) Write a method to add an item to the list.
  3. (15 pts) Draw a picture of what would happen to a list of PList type if you start with pos pointing to NULL, then call your advance method from part a, then call your add method from b, then call your advance method from a.

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!