Question: Need help on C++ program. 1. Create a linked list class (named LinkedListA4), which allows insertions and deletions only at the front and the back
Need help on C++ program.
1. Create a linked list class (named LinkedListA4), which allows insertions and deletions only at the front and the back of the linked list. Make each list element hold an integer. 2. Use this linked list to implement a stack class (named StackA4) and a queue class (named QueueA4). 3. Implement a printAllElements() method that prints all elements in the format: [ elemente, elementi, element2, ... elementN-1 ], where N = current number of nodes For example, if your list, stack or queue has 64,-100,3,25,99 then the output should be: [ 64, -100, 3, 25, 99 ] 4. Demonstrate usage and working functionality of LinkedListA4, StackA4, and Queue A4, by inserting and deleting elements, as well as making use of your printAllElements() method often to show contents. Note: Do not use stack, queue, or list classes provided by the standard library. Implement the linked list, stack and queue yourself as explained during lecture, using structs, pointers, and methods for each operation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
