Using the adt described in dale


Using the ADT described in Dale p280-282, implement a FIFO Queue. Then create a main loop that accepts text commands as specified below and executes the appropriate FIFO queue functions. Note that you cannot use already existing stack and queue operations or include files. You must implement the ADT using basic data structures (arrays or linked lists). However it is fine to make assumptions similar to your text such as placing a limit on the size of the queue.

Important: Be careful with 'edge' or 'border' cases - for example, what happens when you remove an item and no items are present? You may also overflow your data structure depending on your implementation. In these conditions make sure you print an error on the screen. Your program should not break in these conditions!

Inputs:
new - Initializes the queue.
add - inserts the string into the queue.
remove - removes the next item string (using FIFO) on the queue and prints out the value.
isfull - prints whether or not the queue is full
isempty - prints wether or not the queue is empty

You are welcome to use numeric choices such as 1) new 2) isfull 3) isempty etc to simplify coding of input/output routines so long as the core functionality is there and accessible to the user.

Each of your commands should output confirmation such as "Marty has been added to the queue".

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Using the adt described in dale
Reference No:- TGS0117383

Expected delivery within 24 Hours