Stack Queue Game Please Write Java Program Let User Play Stack Queue Game May Use Either A Q37270129

Stack Queue Game

Please write a Java program to let the user play Stack QueueGame. You may use either array-based or reference-basedimplementation for your stack and queue. You must NOT use anyexisting Java classes such as Stack, Queue, ArrayList or Vector inyour program.

Your game program must accept and implement all the following 7commands:

  1. push k – push the integer k into the stack
  2. pop – pop the top of the stack, and display the integer beingpopped off
  3. enqk              – enter the integer k into the queue
  4. deq – delete the front element from the queue, and display theinteger being deleted
  5. showstack – show all the integers in
    OR
    OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.