Question
Implement insertion (or push) and deletion (or pop) for a stack and a circular queue with length of n keys as defined in class. -Input:
Implement insertion (or push) and deletion (or pop) for a stack and a circular queue with length of n keys as defined in class.
-Input: list of pairs of an integer and an operation, e.g.,
10 1.in 3.in 5.in del 2.in .. for the queue
10 1.push 2.push 5.push pop 2.push .. for the stack
/* note that the forefront 10 in each input file indicates the size of the stack or queue. */
/* Note that input is to be read in from a file in a batch. */
-Output: the list before operation and the list after operation displayed on the screen standard outout (not into a file).
A command line user interface has to be provided as follows:
Enter your input file name:
Display the input before: /* display the input integers following a statement */
Display the output after the operation: /* display the resulting output on the screen */
Write a separate program for each question. Total 3 programs (one program for linked list, one for stack and one for queue) are to be submitted to the same directory under handin.
*Provide a README file with specific instructions for compilation and execution for the grader to follow, and any notes you want to add such as how you handle overflow, etc.
Using java,C/C++, intermediate level
Thanks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started