Word puzzles like the Jumble shown below, and found in many newspapers are based on anagrams too. You can also play jumbles online at jumble.com.
Running the program as shown below should print a list of all anagrams in the file specified by the user. The user will not be prompted for a word as in the current version.
The program reads one file, and finds the words in that file that are anagrams of each other.
Each sequence of anagrams is printed on one line, and every line printed should have at least two words that are anagrams. For example, the output of the program might be as follows (depending on the file read). Do not print lines with only one words, e.g., for the word "zoo" which doesn't have any anagrams.
prompt> simpleanagram datafile gazer graze gases sages heals leash shale heaps phase shape hares hears share shear earth hater heart haste hates heats haves shave arise raise lakes leaks
Be sure that every line printed consists of words that
are anagrams of each other and that every line printed
has at least two words on it.
prompt> make simpleanagram prompt> simpleanagram datafile (OR) prompt> simpleanagram (which will prompt for a file name)Alternatively, if you're using Eclipse you'll need to add a make target of simpleanagram using the Eclipse make tutorial for help.
|Implemented as specified in general||8|
|Robust for all inputs/special cases||4|
|Documentation, style of code||4|
In your README, which you must submit, you should include
submit_cps100 anapartI Makefile *.cpp README