Ccl212-18 - Yoursection - Ola-F1 - Yourlastnamefirstnamemi - PDF: Llano, Vergel S. February 4, 2021 2bsemc-1 Ccl212-18
Ccl212-18 - Yoursection - Ola-F1 - Yourlastnamefirstnamemi - PDF: Llano, Vergel S. February 4, 2021 2bsemc-1 Ccl212-18
February 4, 2021
2BSEMC-1 CCL212-18
Filenames: CCL212-18_YourSection_OLA-F1_YourLastnameFirstnameMI.pdf
1. Copy and paste the program code in your Java Editor / Compiler. Provide the missing codes to run the
program.
2. Compile and run the program. Take a screenshot of the output and paste it in the space provided.
3. Trace the program and provide the values for each argument and varables.
Source Code
Queue(int c)
{
front = rear = 0;
capacity = c;
queue = new int[capacity];
}
// decrement rear
rear--;
}
return;
}
// Driver code
public static void main(String[] args)
{
// Create a queue of capacity 4
Queue q = new Queue(4);