C++ Assignment utilizing Linked Lists