[Cs3] lab 14 clarifications

Mikhail Nesterenko mikhail at cs.kent.edu
Fri Dec 1 20:17:44 EST 2023


CS3 students,

For shared pointers, all you have to do is replace singly linked list
template with doubly linked list in this example we studied:

  http://www.cs.kent.edu/~mikhail/classes/cs3/Examples/TemplateIntro/ListTemplate/

The example use of your implementation, linked list should use two
different types (integers and characters) for payload and automatically
deallocate the list when it goes out of scope as in the example.

For list traversal you probably should use either weak or shared
pointers. For proper deallocation, the second (double) link should be
a weak pointer.

If you feel ambitious, demonstrate reverse traversal: following links
backward in your doubly linked list.

If you feel very ambitious, you can implement the Collection abstract
class like you did in Lab 3.

Last two suggestions are optional. 

Thank you,
-- 
Mikhail


More information about the cs3 mailing list