Question: Write a Java program that does the following. No start file given. (Remember to put throws Exception after main signature since you are opening a

Write a Java program that does the following. No start file given. (Remember to put throws Exception after main signature since you are opening a File ) Here is your input file: jumbles.txt

1) Expect the user must to put a filename on the comamnd line like this: C:>java Lab4 jumbles.txt

2) Use that args[0] value as the name of the input file and open it with a BufferedReader

3) Load eveyy line/word of that input file (one word per line) into an ArrayList of String
 

4) Sort that ArrayList of words

5) With every word of the ArrayList output a single line of output containing the word, a space, the canonical form of the word

Output should look like this: 

addej addej ahicryrhe acehhirry alvan aalnv annaab aaabnn baltoc abclot braney abenry celer ceelr couph chopu cukklen cekklnu dica acdi dobeny bdenoy dobol bdloo dufil dfilu dupled ddelpu eslyep eelpsy ettniner eeinnrtt ettorp eoprtt genjal aegjln gluhc cghlu hartox ahortx hoybis bhiosy hucnah achhnu iddec cddei irrpo ioprr kutbec bcektu lappor aloppr lasia aails laurib abilru lubly blluy meefal aeeflm milit iilmt mopsie eimops mycall acllmy nekel eekln nokte eknot noper enopr nwae aenw nyegtr egnrty perrim eimprr preko ekopr pudmy dmpuy pypin inppy rebisc bceirs rodug dgoru rpeoims eimoprs shewo ehosw ardty adrtwy arllc acllrw aldde addely

addej addej ahicryrhe acehhirry alvan aalnv annaab aaabnn baltoc abclot braney abenry celer ceelr couph chopu cukklen cekklnu dica acdi dobeny bdenoy dobol bdloo dufil dfilu dupled ddelpu eslyep eelpsy ettniner eeinnrtt ettorp eoprtt genjal aegjln gluhc cghlu hartox ahortx hoybis bhiosy hucnah achhnu iddec cddei irrpo ioprr kutbec bcektu lappor aloppr lasia aails laurib abilru lubly blluy meefal aeeflm milit iilmt mopsie eimops mycall acllmy nekel eekln nokte eknot noper enopr nwae aenw nyegtr egnrty perrim eimprr preko ekopr pudmy dmpuy pypin inppy rebisc bceirs rodug dgoru rpeoims eimoprs shewo ehosW wardty adrtwy warllc acllrw yaldde addely

Step by Step Solution

3.52 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

imrt jviBufferedReder imrt jviFile imrt jviFileReder imrt jvuti... View full answer

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

Document Format (2 attachments)

PDF file Icon

635f9e2ef1e36_232860.pdf

180 KBs PDF File

Word file Icon

635f9e2ef1e36_232860.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!