Question: Submssion: Submit everything together as one PDF file in Canvas. Due: Oct. 4th, by 11.59 PM Q1 - 20 pts) Consider the implementation of the

Submssion: Submit everything together as one PDF file in Canvas. Due: Oct. 4th, by 11.59 PM Q1 - 20 pts) Consider the implementation of the List ADT using Singly Linked List given to you for this question. Add a member function (to the List class) called recursivePrintForwardReverseOrders that prints the contents of the list in a recursive fashion in both the forward order and reverse order. For example, if the contents of the List are: 10-4812 ->9. the recursive member function should print the List as follows: 10 4 8 12 9 9 12 84 10 Note that both the forward and reverse orders should be printed through an invocation of the recursivePrint ForwardReverseOrders member function on the List object called from the main function. You are free to choose the parameter(s) that need to be passed to the recursivePrint ForwardReverseOrders function. But, you are not supposed to pass more than three parameter(s). A suggestion for the parameter to pass is given in the main function of the code posted for Question 1. To test your code (and take screenshot), create a List of at least 10 elements (with a maximum value of 100) and then call the recursivePrintForwardReverseOrders function on this List object by passing a pointer to the first node in the Linked List as an argument, as shown in the main function of the Singly Linked List code for Question 1 Linked List eode fo You need to submit the following as part of your answer for this question (G) the complete code for the Node class, List class (including the recursivePrintForwardReverseOrderst) function) and the main function. (ii) Snapshot of the execution of the code with at least 10 elements and maximum value of 100 Q2 - 15 pts) Consider the implementation of the Singly Linked List class (named: List) given to you for this question. Your rask is to add a member function called pairwiseSwap) to the Singly Linked List class such that it he code to swap the elements of an integerList (an Submssion: Submit everything together as one PDF file in Canvas. Due: Oct. 4th, by 11.59 PM Q1 - 20 pts) Consider the implementation of the List ADT using Singly Linked List given to you for this question. Add a member function (to the List class) called recursivePrintForwardReverseOrders that prints the contents of the list in a recursive fashion in both the forward order and reverse order. For example, if the contents of the List are: 10-4812 ->9. the recursive member function should print the List as follows: 10 4 8 12 9 9 12 84 10 Note that both the forward and reverse orders should be printed through an invocation of the recursivePrint ForwardReverseOrders member function on the List object called from the main function. You are free to choose the parameter(s) that need to be passed to the recursivePrint ForwardReverseOrders function. But, you are not supposed to pass more than three parameter(s). A suggestion for the parameter to pass is given in the main function of the code posted for Question 1. To test your code (and take screenshot), create a List of at least 10 elements (with a maximum value of 100) and then call the recursivePrintForwardReverseOrders function on this List object by passing a pointer to the first node in the Linked List as an argument, as shown in the main function of the Singly Linked List code for Question 1 Linked List eode fo You need to submit the following as part of your answer for this question (G) the complete code for the Node class, List class (including the recursivePrintForwardReverseOrderst) function) and the main function. (ii) Snapshot of the execution of the code with at least 10 elements and maximum value of 100 Q2 - 15 pts) Consider the implementation of the Singly Linked List class (named: List) given to you for this question. Your rask is to add a member function called pairwiseSwap) to the Singly Linked List class such that it he code to swap the elements of an integerList (an
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
