Question: I am trying to write a simple linkedlist class that puts 200 numbers in a linkedlist ranging from 10000-99999. First, the linkedlist will display 200
You are going to create a Linked List class- you are not allowed to use the Java LinkedList class described in Chapter 15. However, you should read chapter 15 to understand how the Java LinkedList class works Your program will generate and manage random numbers. When the program first begins, it will display 200 random numbers. The random numbers will be stored in a linked list - sorted from smallest to largest. The numbers must all be S digits wide smallest possible number will be 10,000 and the largest will be 99,999. The numbers will be displayed on the screen lined up nicely-10 columns, and as many rows as needed. After the words are displayed, there will be a single line at the bottom that has all the possible commands. The commands are (R)emove. (New. (Find, Size, Ave, (Qjuit. After the command is performed, the screen will re-display all the words in the format listed above. If (RJemove is selected, the program will randomly select a number to remove. The selected number will be displayed along with its location. If (N)ew is selected, the program will generate a new random number and insert it into the correct location in the linked listThe program will then display the new number and identify its location in the lit. Example: "27654 was entered into location 47 /If (F)ind is selected, the program will ask the user for a number. If the number is found, the program will say "Xxxxx ound in location x" where XXXXX is the number and x is the location of the number in the list. If the number is not found, the program will say "XXXXX not found" The Size will show how many numbers are in the list. The Ave will show the nearest integer average of all the numbers. Example screen shot:(1 create 22 words - they all display on the screen) 12345 12456 13467 15678 16756 17498 29876 34567 34679 34934 36786 37648 38765 39786 45678 47865 48987 58989 67859 74857 83765 98765 (R)emove (N)ew (F)ind Size:22 Ave:40636 (Quit 1/ I press N followed by the return key to add a new random number. > N 345 12456 13467 15678 16756 17498 29876 34567 34679 34934 36786 37648 38765 39786 45678 47865 48987 5989 67859 74857 83765 98765 99346 99346 was added to location 23 (R)emove (N)ew (F)ind Size:22 Ave:40636 (Quit / I press R to remove a number 12345 12456 13467 15678 16756 17498 34567 34679 34934 36786 37648 38765 39786 45678 47865 48987 58989 67859 74857 83765 98765 99346 29876 was removed (A)dd (R)emove (F)ind Size: 22 Ave:43794 (Quit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
