IN JAVA
Minimal Documentation Required (no javadoc)
Purpose
The purpose of this assignment is to introduce you to basicoperations on a linked list.
Specifics
Design a program that generates a linked list of randomlygenerated Integer objects. Present a menu at program start thatgives the user the following options (most of these options willhave corresponding methods in a Linked List class):
1. Create a new list. The size will be specified by the user,make sure a non-negative value is entered. If there is apre-existing list when this option is chosen, make sure you deletethe contents of that list before creating your new list.
2. Sort the list. How you implement this is up to you. You caninsert items in the list such that the list is always in sortedorder or you can write a sort routine. You may not call a sortroutine provided by the Java API.
3. Print the list (to the screen), one number per line.
4. Print the list in reverse order (to the screen), one numberper line.
5. Generate a sub-list that contains all the even numbers in thecurrent list. This list should be returned and the contents shouldbe displayed (to the screen), one number per line.
6. Print the contents of every \"nth\" node in the list. Obtainthe \"n\" from the user, ensure it is greater than 0.
7. Delete node(s) containing an integer value entered by theuser. You should report how many were deleted to the user.
8. Delete the contents of the current list.
9. Quit
You may use any linked list implementation you wish (singlylinked, doubly linked, dummy head node, circular).
In addition to your LinkedList class, include a driver filecalled ListTester that will contain the menu and anything else youdeem necessary (perhaps a utility to generate randomIntegers...).
Keep things modular and encapsulate your data properly - do notlet anything outside the Linked List class have direct access toany of the nodes.
Do not accept Invalid input of any type from the user and do notlet user input crash your program.
PLEASE IMPLEMENT ALL