Question: Then add the next five ( 5 ) four ( 4 ) objects ( # 9 thru 1 2 ) such that their index in

Then add the next five (5) four (4) objects (#9 thru 12) such that their index in the linked list is calculated as (index in array %5).
Remove two (2) objects at indexes (countCurrency %6) and (countCurrency /7) in that order.
Print the contents of the list.
For the stack, perform the following operations in order -
Push seven (7) objects starting from the array index 13 onwards to the stack.
Peek the top of the stack - print the result.
Perform three (3) pops in succession.
Print the contents of the stack.
Push five (5) more objects from the start of the objects array to the stack.
Pop twice in succession.
Print the contents of the stack.
For the queue, perform the following operations in order -
Enqueue the seven (7) objects at odd indexes starting from index 5 in the array.
Peek the front and end of the queue - print the results.
Perform two (2) dequeues in succession.
Print the contents of the queue.
Enqueue five (5) more objects from the index 10 in the array.
Dequeue three times in succession.
Print the contents of the queue.
End the program with a leaving message of your choice. Remember to clean up before the program ends.
Restrict all your input / output to the main driver program only, except for the existing screen print inside the Currency print methods.
Your submission will include the following code files only and nothing else:
3 or 4 class files for this lab's classes - LinkNode, SinglyLinkedList, Stack, Queue.
1 code file for the main of this lab.
Screenshots (jpg or png) numbered in order of showing the output of the program, in an easy to read zoom factor.
Remember to include pre/post documentation and name blocks in your code files.
2 class files from prior lab's classes - Currency, Dollar. If you change anything in your Currency and Dollar class files for this lab, highlight the sections changed with CLEAR comment block explaining why at the top of the code file - remember, I have your class files from the prior submission to compare. Not outlining the changes will be cause for deductions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!