Grocery Store Queue Simulation
VerifiedAdded on 2019/09/22
|2
|601
|291
Practical Assignment
AI Summary
This practical assignment involves creating a Java program to simulate customer queue management in a grocery store with two cashier counters. The program uses a `Customer` class to represent customers with attributes like ID, number of items, and total price. A `Cashier` class manages customer queues using methods for adding customers, serving customers, getting queue length, cloning queues, checking for empty/full queues, and displaying queue details. The main application provides a menu-driven interface for customer checkout, cashier service, reporting queue status, manager queue adjustment (balancing queue lengths), merging queues (when a cashier closes), and closing the store (reporting total sales). The program starts by prompting the user for the queue capacity, which is used to create the cashier queues. The program continues until the user chooses to close the store.
1 out of 2






