Question: Your assignment is as follows: create 2 LinearNode reference variables called list and sortedList, which will be pointers to the first node in 2 linked

Your assignment is as follows:

  • create 2 LinearNode reference variables called list and sortedList, which will be pointers to the first node in 2 linked lists of LinearNode objects
  • you will need other LinearNode reference variables (you figure out which ones)
  • use a random number generator to add (the same) 10 numbers between 1 and 100 inclusive to list and sortedList
  • for list - add the numbers so that the first number is at the beginning of the list, the second number is second in the list, the last number generated is at the end of the list
  • for sortedList - you must add the numbers so that the numbers in the list are always sorted from lowest at the beginning to highest at the end
  • after each number is placed in the 2 lists write out the entire contents of each list to verify that each list is correct

    Your assignment is as follows:

  • create 2 LinearNode reference variables called list and sortedList, which will be pointers to the first node in 2 linked lists of LinearNode objects
  • you will need other LinearNode reference variables (you figure out which ones)
  • use a random number generator to add (the same) 10 numbers between 1 and 100 inclusive to list and sortedList
  • for list - add the numbers so that the first number is at the beginning of the list, the second number is second in the list, the last number generated is at the end of the list
  • for sortedList - you must add the numbers so that the numbers in the list are always sorted from lowest at the beginning to highest at the end
  • after each number is placed in the 2 lists write out the entire contents of each list to verify that each list is correct

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!