Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / You have been asked to read a text file word by word in an array of Strings, process the words, sort the words in alphabetical order, and save them in sorted order in another file with following specifications: 1

You have been asked to read a text file word by word in an array of Strings, process the words, sort the words in alphabetical order, and save them in sorted order in another file with following specifications: 1

Computer Science

You have been asked to read a text file word by word in an array of Strings, process the words, sort the words in alphabetical order, and save them in sorted order in another file with following specifications:

1.Prompt user input for file names, input file name and output file name.

2.Count number of the words in the file, and then make an array of String with size equal to the number of the words in the file.

3.Reopen the file, read, and store each word of the file in the array.

4.Change all world to lower case.

5. Print number of the words, and frequency of each letter ('a' to 'z'), ignore cases, on the screen.

6.If words have any non-letter symbols in the beginning or at the end of the words, then remove them from both sides of the words. If still word contains any other non-letter symbol except hyphen '-', then get ride of the word, otherwise keep it.

7. Sort the words in alphabetic order. Note that you are not allowed to use Java build in methods to sort the words. You should develop your own mehtod for soting.

8. Save the words in a file in a unique order. If there are many occurrences of the same word in the array, then save only one instance of each word.

Check the sample unsorted.txt and sorted.txt files. Your output file may be a little different from sample output file provides here based on your processing methods. Check Sample.java program that reads file unsorted.txt and prints each word on the screen. Note that both Sample.java and unsorted.txt files should be in the same directory.

 

Option 1

Low Cost Option
Download this past answer in few clicks

3.87 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 7 times

Completion Status 100%

Sitejabber (5.0)

BBC (5.0)

Trustpilot (4.8)

Google (5.0)

Related Questions