Terminé

list of words

the program has to process a list of words, count the occurence of each work in the list, and print the list of words and the number of occurrences in order of the frequency, starting with the most frequency word on the screen. We will use the array of String references that will be passed as the argument to the main method for the data input. This array(usually caleed args) represents all the words that follow the class name on the command line. E.g. if the command >java Sort the big dog and the little dog walk down the old road to the little village is entered, the first array element will refer to the String object"the", the second to "big", and so on. In order to maintain the list of words and their occurences, we will enter every name into a double linked list. The list elements need a field for the frequency, i.e. the number fo occurrences of the particular word. This can be done as follows: we use a reference variable"pointer"(or"index") to traverse the double linked list to find the entry for that word. If it does not exist in the list, we create a new entry for this word, set the frequency to 1, and add it at the end of the list. If the word is already in the list, we just increment its frequency field by 1. Now, we have to check that the ordering condition is still satisfied. That means, the entries with most frequent words must be at the beginning of the list; followed by the second frequent word, and so on. If teh frequency is incremented, and becomes greater than the frequency of the preceding element, the list element has to be moved towards the beginning of the list until the condition is satisfied. We can do the move, by just trading places with the preceding element. Of course, the structure of the remaining list has to be conserved. After all word are included, the program can just print the list of word and their frequency. The class String offers a method"compareTo" which returns 1 if the contents of the string is lexicographically greater than the argument, -1 of it is less, and 0 if the contents of both Strings is the same. class String { public int compareTo(String x) {.... ..... The program can be written as one Java class. We only need a main method. To print the list on the screen, we can use the method"[url removed, login to view](...)".

## Deliverables

comments 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.

## Platform

windows

## Deadline information

need program before midnight 1/24/03 eastern

Compétences : Ingénierie, Java, MySQL, PHP, Architecture Logicielle, Tests de Logiciels

en voir plus : words that end in bid, use of data structure, string source code java, string in data structure, string data structure, sort array list in java, sort array c, print println java, pointer in data structure, pointer data structure, pointer array in data structure, list of data structure, list in data structure, list data structure, linked list in data structure, linked list data structure, linked int, index data structure, frequency count in data structure, double data entry method

Concernant l'employeur :
( 4 commentaires ) United States

Nº du projet : #2901504

Décerné à:

keedonou

See private message.

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 14 jours
(4 Commentaires)
1.1

8 freelance font une offre moyenne de $13 pour ce travail

herculesevw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(79 Commentaires)
4.7
fabianjones

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(20 Commentaires)
3.3
rundmsef

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(13 Commentaires)
2.7
terenceburnard

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(6 Commentaires)
2.5
nickyro

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(8 Commentaires)
2.3
junipervw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(6 Commentaires)
1.2
nettervw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(2 Commentaires)
0.0