Question: In this assignment, you will design and code a Java console application that reads in a varying number of course codes, stores them in a

In this assignment, you will design and code a Java console application that reads in a varying number of course codes, stores them in a Java LinkedList, sorts them, prints out the size of the LinkedList, and prints out the sorted course codes one by one.

Explain your approach you took to complete this assignment and the major decisions you made

The requirements of this application are as follows. The application is to prompt the user to enter 3 sets of course codes (e.g. IT4789) one set at a time on a line by itself. Course codes in a set are separated by spaces. For each set, the application then:

Stores the course code set into a Java LinkedList

Sort the LinkedList

Prints out the size of the LinkedList

Iterate over the sorted course codes of the LinkedList and prints them out one by one

Use these 3 sets of course codes to test your application:

IT4789 IT4782 IT4786 IT4784

IT3345 IT2230

IT2230

Successful completion of this assignment will show, for each of the 3 sets, the size of the LinkedList and correct sort order of its course codes. Your program output should look like this sample output:

PLEASE EXPLAIN OR COMMENT THROUGHOUT CODE WHAT YOU USED AND WHY

In this assignment, you will design and code a Java console application

U5A1_SortLinkedlist_Result - NetBeans IDE 8.1 - 0 X File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Q- Search ( C D) T . . Projects Files x Services - StartPage x USA1 SortLinkedList Result.java x USA_Sortlinkedist Result Source Hstory 933 9 9 9 + build 24 nbproject src 25 System.out.println("Teacher's Copy"); Sal_sortin edist_result U5A1 SortLinkedlist_ Output - 15A1_SortLinkedlist_Result (run) x build.ml manifest.mf run: Teacher's Copy Enter 3 collections of course codes one collection per line: IT4789 IT4782 IT4786 IT4784 Size: 4 Sorted: IT4782 IT4784 IT4786 IT4789 IT3345 IT2230 Size: 2 Sorted: IT2230 IT3345 IT2230 Size: 1 Sorted: IT2230 BUILD SUCCESSFUL (total time: 1 minute 20 seconds) 23:36

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!