write programs for exercise 8 and 9 of page 1067 of your book. Please see the program description of the two exercises.
8. Member Insertion By Position Modify the list class you created in the previous programming challenges by adding a member function for inserting a new item at a specified position:
void insert(double x, int pos); A position of ti means that x will become the first item on the list, a position of 1 means that x will become the second item on the list, and so on. A position equal to, or greater than, the length of the list means that the x is placed at the end of the list.
9. Member Removal by Position Modify the list class you created in the previous programming challenges by adding a member function for deleting a node at a specified position:
void remove(int pos); A value of 0 for the position means that the first node on the list (the current head) is deleted. The function does nothing if the value passed for pos is greater or equal to the length of the list.
#Sales Offer!| Get upto 25% Off: