Question
Make a Linked List class that must have the following functions. AddValue(int ) this function must take an integer and add it as the last
Make a Linked List class that must have the following functions. AddValue(int ) this function must take an integer and add it as the last value in the linked list allocate space for a bogey. Record its address in a pointer. Give its data the value given by the user in the arguments If head pointer (engine) of the link list is NULL assign it the address of this new bogey object that you declared in the last step. Else iterate the list from starting bogey till the last bogey and link the last bogey to the new bogey you have just created. What should the next link pointer of the new bogey point to? PrintArray() this function will print the linked list contents one by one GetValueAtIndex(int ) this function will take an index (or bogey number in this case) and return the value at that index. It must not return a value to that was never added!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started