Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

Students also viewed these Databases questions