Question: Write a program that inserts 25 random numbers from 0 to 99 (using SecureRandom) inclusive into a linked-list object in sorted order and then calls

Write a program that inserts 25 random numbers from 0 to 99 (using SecureRandom) inclusive into a linked-list object in sorted order and then calls the linked-list objects print() method.

The following files are provided for you and must be used for this exercise:

  • SortedList.java
    • Modify the insertSorted() method to create a sorted list. Feel free to use any ListNode or SortedList method. If you add any new methods they must be called either directly or indirectly from insertSorted().
    • Do not modify or change any other aspect of SortedList.java.
  • ListTest.java
    • Modify to insert 25 integers randomly into the list object using the insertSorted() method in SortedList.java and a SecureRandom object.
    • Dont forget to add the output of your name and lab number.
  • EmptyListException.java which is used by SortedList and ListTest and should not be changed or modified at all.

Here is an output example: Write a program that inserts 25 random numbers from 0 to 99

ListTest "C:\Program Files\Java jdk-10.0.2\bin\java.exe" "-javaagent:C:\Program Files\JetBrains Inte] Prof Sipantzi -- Lab #8 JI

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!