540080 Java Linked List

In Progress Posted Dec 11, 2011 Paid on delivery
In Progress Paid on delivery

Hi, I need a program that read in a sequence of integers from a text file (given in command prompt, eg java List [login to view URL]), and then prints the results in a table - with integers in ascending order along with the no. of times each integer appeared in the file.

eg a text file with:

2

30

5

7

9

2

2

30

-1 (this value needs to stop the program reading the file, ie it is an end of file character that I need to use)

should produce an output:

Value Occurences

2 3

5 1

7 1

9 1

30 2

Need to make use of Linked List structure. The members of the list need to be objects which contain info about each number and the occurences. When a new number is read in from the text file, it should be searched for in the list - if it has already appeared add one to the count, if not add the new value to the list in the right place to keep ascending order. The list must be maintained so it is always in ascending order.

When file has been read, table is printed out by traversing the list from start to finish.

The code needs to be fairly simply and easy for me to read, as I am really only a begginer. Thanks!

Java Odd Jobs

Project ID: #2286021

About the project

Remote project Active Jul 11, 2012