Question

This program needs to be in JAVA language. Also, I need to create my own LinkedList class, I can not use the Java LinkedList Library. Please read all aspects of the program, it needs to display 200 random numbers that are 5 digits long sorted from smallest to largest. I can not use Collection(s) or packages libraries. Should only need:

import java.util.Random;

import java.util.Scanner;

Please provide output screenshots after the code.

Thank you!

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 5 digits wide - smallest possible number will be 10,000 and the largest will be 99,999. The numbers will be displayed on the screen Iined 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, (N)ew, (F)ind, Size, Ave, (Q)uit, After the command is performed, the screen will re-display all the words in the format listed above. If (R)emove 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 listTbe program will then display the new number and identify its location in the list. 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 found 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: (I 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 50989 67859 74857 83765 98765 (R)emove_N(F)ind Ave:40636 (Quit Size:L2 //I press N followed by the return key to add a new random number 12345 12456 13467 15678 16756 17498 29876 34567 34679 34934 36786 37648 38765 39786 45678 47865 48987 50989 67859 74857 83765 98765 99346 99346 was added to location 23 Ave:40636 (Quit Size:L2 > R / I press R to remove a number 12345 12456 13467 15678 16756 17498 34567 34679 34934 36786 37648 38765 39786 45678 47865 48987 5098967859 74857 83765 98765 99346 29876 was removed (A)dd (R)emove(F)ind Size: 22Ave:43794(Q)uit

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
This program needs to be in JAVA language. Also, I need to create my own LinkedList...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • JAVA program. I have created a game called GuessFive that generates a 5-digit random number, with...

    JAVA program. I have created a game called GuessFive that generates a 5-digit random number, with individual digits from 0 to 9 inclusive. (i.e. 12345, 09382, 33044, etc.) The player then tries to guess the number. With each guess the program displays two numbers, the first is the number of correct digits that are in the proper position and the second number is the sum of the correct digits. When the user enters the correct five-digit number the program returns...

  • Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anythi...

    Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anything. No code outside of a function! Median List Traversal and Exception Handling Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen. Your menu should have 6 options 50% below 50% above Add a number to the list/array...

  • I need this in java please Create an automobile class that will be used by a...

    I need this in java please Create an automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class: private string make private string model private string color private int year private int mileage. Your program should have appropriate methods such as: default constructor parameterized constructor add a new vehicle method list vehicle information (return string array) remove a vehicle method update vehicle attributes method. All methods...

  • *Java* Hi. I need some help with creating generic methods in Java. Write a program GenMethods...

    *Java* Hi. I need some help with creating generic methods in Java. Write a program GenMethods that has the following generic methods: (1) Write the following method that returns a new ArrayList. The new list contains the nonduplicate (i.e., distinct) elements from the original list. public static ArrayList removeDuplicates(ArrayList list) (2) Write the following method that shuffles an ArrayList. It should do this specifically by swapping two indexes determined by the use of the random class (use Random rand =...

  • Needs Help with Java programming language For this assignment, you need to write a simulation program...

    Needs Help with Java programming language For this assignment, you need to write a simulation program to determine the average waiting time at a grocery store checkout while varying the number of customers and the number of checkout lanes. Classes needed: SortedLinked List: Implement a generic sorted singly-linked list which contains all of the elements included in the unsorted linked list developed in class, but modifies it in the following way: • delete the addfirst, addlast, and add(index) methods and...

  • Currently in my program I am trying to use and if else statement to choose either...

    Currently in my program I am trying to use and if else statement to choose either to add or subtract. I'm calling eitehr my addition method or my subtraction method in the statemenet. However i keep getting an error. " Exception in thread "main" java.lang.Error: Unresolved compilation problem: at ArithmeticOperators.main(ArithmeticOperators.java:19)" I'm not sure what is causing this at all, below is my code. import java.util.*; public class ArithmeticOperators{ public LinkedList head; private static Scanner userChoice; public String toString() {        ...

  • This needs to be done in Java using Using Multiple Generic Data Structures – LinkedList and Array...

    this needs to be done in Java using Using Multiple Generic Data Structures – LinkedList and ArrayList In this assignment, you will write a system to manage email address lists (ostensibly so that you could send emails to a list which has a name – which would send an email to each of the addresses in the list – although we will not actually implement sending emails.  Displaying the list will simulate being able to send the emails). We will...

  • I need help in Python. This is a two step problem So I have the code...

    I need help in Python. This is a two step problem So I have the code down, but I am missing some requirements that I am stuck on. Also, I need help verifying the problem is correct.:) 7. Random Number File Writer Write a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file...

  • Question: How can I solve it in "Java program"?, i need test code also. Define Pi...

    Question: How can I solve it in "Java program"?, i need test code also. Define Pi to be a parking lane i in a parking lot and carj to be the jth car; where the number of lanes in a parking lot is 4 and there are 7 cars to park. 1<= i<=4, and Cj: 1<=j<=7. Assume that all lanes are of the same length, and all cars are also of the same length, hence, the same number of cars...

  • Hello. I am using a Java program, which is console-baed. Here is my question. Thank you....

    Hello. I am using a Java program, which is console-baed. Here is my question. Thank you. 1-1 Write a Java program, using appropriate methods and parameter passing, that obtains from the user the following items: a person’s age, the person’s gender (male or female), the person’s email address, and the person’s annual salary. The program should continue obtaining these details for as many people as the user wishes. As the data is obtained from the user validate the age to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT