thequeue displayqueue()/display queue thequeue insert( )thequeue insert( )/insert items thequeue displayqueue()/display queue thequeue remove()thequeue remove()/remove items thequeue displayqueue()/end main(/display queue /end class linkqueueapp the program creates queueinserts two itemsinserts two more itemsand removes two itemsfollowing each of these operations the queue is displayed here' the outputqueue (front-->rear) queue (front-->rear) queue (front-->rear) here the methods insert(and remove(in the linkqueue class are implemented by the insertlast(and deletefirst(methods of the firstlastlist class we've substituted linked list for the array used to implement the queue in the queue program of the linkstack and linkqueue programs emphasize that stacks and queues are conceptual entitiesseparate from their implementations stack can be implemented equally well by an array or by linked list what' important about stack is the push(and pop(operations and how they're usedit' not the underlying mechanism used to implement these operations when would you use linked list as opposed to an array as the implementation of stack or queueone consideration is how accurately you can predict the amount of data the stack or queue will need to hold if this isn' clearthe linked list gives you more flexibility than an array both are fastso that' probably not major consideration data types and abstraction where does the term abstract data type come fromlet' look at the "data typepart of it firstand then return to "abstract data types the phrase "data typecovers lot of ground it was first applied to built-in types such as int and double this is probably what you first think of when you hear the term when you talk about primitive typeyou're actually referring to two thingsa data item with certain characteristicsand permissible operations on that data for exampletype int variables in java can have whole-number values between - , , , and + , , , and the operators +-*/and so on can be applied to them the data type' permissible operations are an inseparable part of its identityunderstanding the type means understanding what operations can be performed on it with the advent of object-oriented programmingit became possible to create your own