1.4-Software-Development-Principles

Collections: Implement your own linked list

In previous exercise we made a List implementation by using an Array.

In this exercise we are going to implement a List using a linked list datastructure. The non-generic code for this should be available to you through an exercise in Introduction Datastructures and Algorithms.

If you want to know more about a linked list, you can view the explanation by visualgo.

Assignment

Create a new project and copy the List implementation of the previous exercise into this project.

Copy the test file for the ArrayList, rename it so it is clear that the code now tests a Linked list. It should be possible to keep all of the code the same, but you will need to change all the declarations of ArrayList to LinkedList.

Testing

Do not forget to test your application!