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

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!