Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using LinkedList to Store, Sort, and Iterate Over Course Codes Design and code a Java console application that reads in a varying number of course

Using LinkedList to Store, Sort, and Iterate Over Course Codes

Design and code a Java console application that reads in a varying number of course codes, stores them in a Java LinkedList, sort them, prints out the size of the LinkedList, and prints out the sorted course codes one by one. You can use either the Toolwire environment or your local Java development environment to complete this assignment.

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.

Example:

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions