Linked List Exercise
To gain practice using linked lists.
For this lab, you will extend the "IntList" class with a function that will
calculate the sum of the numbers stored in the list. You will write the function
and then call it from main to test it.
- Start with the IntList class example from class: IntList.cpp
- You will write a member function called "sum" that wil calculate the sum of the numbers stored in the list.
- It will need to loop through the list as we discussed in class.
- You will edit the main function so that it adds the numbers 1 through 10 to an IntList
object, then calls your sum function to calculate the sum.
When you're finished, email your edited IntList.cpp file to email@example.com.
Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.