Question: Exercise Summary: Implement following classes and functions ( C++ style please)1. Node class that can store integer data and the address of next Node.2. Introduce

Exercise Summary: Implement following classes and functions ( C++ style please)1. Node class that can store integer data and the address of next Node.2. Introduce at least 5 nodes in main function, then program 2a-2f in main function.a. Connect them together.b. Introduce a node and insert it before the first node of the 5 nodesc. Introduce a node and insert it in the middle of the 5 nodesd. Traverse the 5 nodes and print all elements oute. Traverse to the end of 5 nodes and delete the last nodef. Traverse to the middle of 5 nodes and delete the middle node.g. Delete the node from the beginning.3. Introduce a SLL (Singly Linked List) class (home practice if no time)a. Introduce a front private data memberb. Introduce a SLL constructor and destructorc. Introduce insertToFront function similar to 2bd. Introduce deleteFromFront function similar to 2ge. Introduce printAll function similar to 2dThe following 3 are harder questions. Please try them first.f. Introduce deleteLast function similar to 2eg. Introduce insertToMiddle function similar to 2c h. Introduce deleteMiddle function similar to 2fi. Introduce deleteLastNode function(If there are even number of nodes, for convenience, the left of the two nodes in the middle of SLL is your middle node)

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!