1. Engineering
  2. Computer Science
  3. assignment 1 review linked list spring 2018 program description using...

Question: assignment 1 review linked list spring 2018 program description using...

Question details

Assignment 1 (Review; Linked List) Spring 2018


Using C++, create a (doubly) linked list data structure. At a minimum, you must have a List class that contains the list functionality (including an insert function) and a linking object ("link node") class. For convenience, you may include the data in the link node objects, or you may use a separate, third, (possibly generic) data class or generic (template) data type. You may use an inner class for the LinkNode and/or include the LinkNode class with the List class file if you wish. Your list must have functions to both insert and remove (and return) values from both the front and end of the list. You may use code that you have written previously as a starting point for this assignment. You may not use somebody else's code as a starting point for your assignment. You must code the list yourself — use of a "standard container" (such as an STL class, Vector, or ArrayList) is not permitted for this assignment.

Using composition (with the List class,) define a Queue class that has enque and deque functions, as well as an isEmpty function.

(Each of your classes may have any additional functionality that you deem necessary)

Write a main function that will read an unspecified number (until EOF) of input strings (each string may include whitespace and is terminated with a newline) from STDIN. Enque each string into your Queue. After you have read all of the input, deque each string from your Queue, printing it to STDOUT (one per line). Your program should have no other output.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution