Question: **java please** In this project, you are provided a dictionary file named dict.txt . You need to create a client program Project1.java that use the

**java please** In this project, you are provided a dictionary file named dict.txt. You need to create a client program Project1.java that use the dictionary file to find all anagram phases that matches a given word.

Your program should first read in the dictionary file and sort it, but instead of sorting in alphabetical order it should sort according to each words canonical form. The canonical form of a word contains the same letters as the original, but in sorted order.

Thus, the canonical form of computer is cemoprtu, and the canonical form of program is agmoprr. When your dictionary file is sorted, the word program would be placed before the word computer, because its canonical form comes first in alphabetical order.

If the word you entered is not contained in the file, print out a message The word is not existed in the dictionary, then prompt user to reenter.

Sample output:

Welcome to Yourfirstname Lastnames anagram solver.

Please enter the dictionary file you want to use: dict.txt

Word to scramble (Enter N/n to quit)? share

All words found in share:

hares

hears

share

shear

Word to scramble (Enter N/n to quit)? tap

All words found in tap:

apt

pat

tap

Word to scramble (Enter N/n to quit)? xttrt

This word does not exist in the dictionary

Word to scramble (Enter N/n to quit)? N

Thank you for using Yourfirstname Lastnames anagram solver!

Have a nice day!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!