Question: Consider a simple singly-linked list that implements an ordered list of integers in a class called IList. Give appropriate declarations for the data members of
- Consider asimple singly-linked listthat implements anordered listof integers in a class called IList.
- Give appropriatedeclarationsfor the data members of the class.
- Write aniterativeclass member function list_sum() that returns thesumof the values in such a list.
- Write the necessary parts of arecursiveimplementation of the function in part (b).
- How would either of the public member functions in parts (b) and (c) becalledin a client program?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
