Question
Task-1 : Modify the above program to implement a QUEUE in a bank as depicted by the following sample output: i. Provide the menu as
Task-1 : Modify the above program to implement a QUEUE in a bank as depicted by the following sample output: i. Provide the menu as shown below. Run the program in a loop; stop when user opts 4. ii. Add a customer should add an int at the end using the method addLast(). iii. Remove a customer should delete the int at front using the method removeFirst(). iv. Show the queue should display the queue using the method System.out.println(). Queue in a Bank 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit Your choice? 1 Added customer # 1 Queue in a Bank 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit Your choice? 1 Added customer # 2 Queue in a Bank 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit Your choice? 1 Added customer # 3 Queue in a Bank 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit Your choice? 3 Queue = 1, 2 , 3 Queue in a Bank 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit Your choice? 2 Removed customer # 1 Queue = 2 , 3
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