Question: 5) For the question below, fill in initial values for instance variable and then fill in the method body of the enqueue() method. Use the

5) For the question below, fill in initial values for instance variable and then fill in the method body of the enqueue() method. Use the extra sheet to complete the enqueue method if needed.

class ArrayQueue{

//instance variables

int head ;

int tail ;

int listsize;

int mysize;

Object [] QueueList;

//constructor method

publicArrayQueue(int size){

mysize = size

QueueList = new Object[mysize];

int head = ____; //Fill in the initial value for head

int tail =_____; //Fill in initial value for tail

int listsize=______//this variable is optional no need to fill it in

}

//instance methods

//return true if Queue is empty false otherwise

public boolean isEmpty() { return false;}

//return true if Queue is full false otherwise

public boolean isFull(){return false; }

/**

*

*

*/

public void enqueue (Object item) {

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!