Question
An incomplete application program is given to you AppPart2.java. We want the program to use a DEQueue object to create a sorted list of names.
An incomplete application program is given to you AppPart2.java. We want the program to use a DEQueue object to create a sorted list of names. The program gives a user the following three options to choose from insert, delete, and quit. If the user selects insert, the program should accept a name (String type) from the user and insert it into the deque in a sorted manner. If the user selects delete, the program should accept a name (String type) from the user and delete that name from the deque. Display the contents of deque after each insert/delete operation. The program continues to prompt the user for options until the user chooses to quit. You have to implement the insert and delete operations in the given incomplete program (see line#36, 38). You can make the following assumptions: - User always tries to insert/delete a string type value only, i.e., you dont have to worry about wrong input type from the user. - In case of repeated values, delete operation will delete the first occurrence only.
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