Resource-efficient programming (INF205) lab u40: 6th October 2022
1. Terminology
The INF205 glossary document has been set up. We will periodically collect new suggested terms and definitions, still following the same principles as in no. 1 from lab u36.
Please suggest one additional term, together with your own definition of that term.
2. Sequential data structures
The example code "sequential data structures" contains an abstract class (interface) called "Sequence" and two implementations of it, one as a dynamic array and one as a singly linked list. The task is to add a doubly linked list as an additional implementation.
- Look through the code, specially class SinglyLinkedList: public Sequence. Discuss it, ask questions during the tutorial session, all until you are confident to understand all that is done and why it is done.
- Create a new class for the doubly linked list, but at first do not make it a child of Sequence. Implement as many functionalities required by the Sequence interface as you can.
- Only if (and when) you implemented all the methods from Sequence, make your doubly linked list class a child of it. Now you should be able to run the same test and performance measurement on it as it is done for the other two types of sequences.
(Submit your code and findings through Canvas - also an incomplete code if you don't complete all the task - many thanks!)