Answer the given question with a proper explanation and step-by-step solution. Write in Java: Write a menu-driven program to illustrate the use of a linked list. The entries will only consist of integer number keys (values). The program should implement the following options in order: • Insert- insert a key into a list- not allowing duplicate integers. • Delete- delete a key from the list. • Search- finds or does not find a particular key in the list. • Print- prints the list graphically in horizontal form. If the list is empty output- "Nothing to print". • Size- count of all the keys in the list. • Sort- sorts the keys in the list in ascending order. • Reverse- reverses the order of the keys in the list • Rotate- moves the key at the front of the list to the end of the list. If the list has 0 or 1 elements it should have no effect on the list. • Shift- rearranges the keys of a list by moving to the end of the list all values that are in odd number positions (indexes) and otherwise preserving list order. • Clear - delete all the keys from the list. Output "Empty List". • Quit- Quit the program.
Answer the given question with a proper explanation and step-by-step solution.
Write in Java:
Write a menu-driven program to illustrate the use of a linked list. The entries will only consist of integer number keys (values). The program should implement the following options in order:
• Insert- insert a key into a list- not allowing duplicate integers.
• Delete- delete a key from the list.
• Search- finds or does not find a particular key in the list.
• Print- prints the list graphically in horizontal form. If the list is empty output- "Nothing to print".
• Size- count of all the keys in the list.
• Sort- sorts the keys in the list in ascending order.
• Reverse- reverses the order of the keys in the list
• Rotate- moves the key at the front of the list to the end of the list. If the list has 0 or 1 elements it should have no effect on the list.
• Shift- rearranges the keys of a list by moving to the end of the list all values that are in odd number positions (indexes) and otherwise preserving list order.
• Clear - delete all the keys from the list. Output "Empty List".
• Quit- Quit the program.
Step by step
Solved in 2 steps