Question
Design and implement a system for customer to purchase items from bakery using queue. There will be 2 windows in the bakery. (1 for males
Design and implement a system for customer to purchase items from bakery using queue. There will be 2 windows in the bakery. (1 for males and 1 for females) Bakery have the following items (cakes, rusks, biscuits) Every window can accommodate 5 users. Queue is attached with every window. User can get the window no after entering the shop by entering their name and gender. If both windows have 5 customers than customer have to wait and added to another waiting queue. Whenever users is exit than the waiting user can get the window no. Customer can buy any items from the given bakery item list on his/her turn. After buying item system should show customer bill also. System should show count and peek of every queue whenever user enter or exit.
The code should be in java language , and should be done simply with explanation and all the methods and the main class is included in the code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started