Question: Please I want this execise to be solved using C++ and beside each code a comment to understand the code LAB EXERCISE: 1. Create a

Please I want this execise to be solved using C++ and beside each code a comment to understand the code
 Please I want this execise to be solved using C++ and
beside each code a comment to understand the code LAB EXERCISE: 1.
Create a new project with the name Lab3_LinkList Project. 2. Create a

LAB EXERCISE: 1. Create a new project with the name Lab3_LinkList Project. 2. Create a C++ file with name LinkedList and copy struct node class into it. 3. Add main method and complete the balnk with suitable statements int main() { // construct four linked list nodes and add their values( see output) // display the nodes values using printAllNodes() // print the largest value in the linked list // print the value of the second node Il print the value of the second last node // delete the last node // display the nodes values using printAllNodeso // modify the nodes values by using odd2Even2Odd method // display the nodes values using printAllNodes return 0; } 4. Add the following methods to the file: Taskl: a method named find Largest() which finds the largest value in the linked list and returns its data to the calling main() method. Hint: Use following method header: int findLargest (node* head) { Task2: a method named data2ndNode() which returns the data of second node in the linked list, to the calling main() method. Hint: Use following method header: node* data2ndNode (node* head) { Task3: a method named data2ndLastNode() which returns the data of second last node in the linked list, to the calling main() method. Hint: Use following method header: node* data2ndLastNode (node* head ) Task4: a method named deleteLastNode() which deletes last node in the existing linked list. Hint: Use following method header: void deleteLastNode (node* head) { Tasks: a method named odd2Even20dd() which changes all odd value nodes into even by subtracting 1 from every odd node and all even value nodes into odd by adding I into every even node. Hint: Use following method header: void odd2Even2odd (node* head) } Output: the nodes have been constructed with values: 10 21 6 8 the largest value is: 21 second node has the value: 21 second last node has the value: 6 last node with value 8 has been deleted!! The list after deleting a node: 10 21 6 The list after modifing the nodes values 11 20 7 ... Program finished with exit code o Press ENTER to exit console

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!