PPT Slide
Suppose you want to use this Queue class to simulate a line of Customers, and you do:
class Customer {
...
} // Customer
class Cashier {
Queue customerQueue = new Queue( );
...
public void getNextCustomer( ) {
Customer cust;
...
cust = (Customer) customerQueue.dequeue( );
...
} // getNextCustomer
...
} // Cashier
Exceptions: Example
Previous slide
Next slide
Back to first slide
View graphic version