Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ language sample dictWords.txt 3. Find subwords - You should use string class whenever possible In this problem, you are required to do: Ask a
c++ language
sample dictWords.txt
3. Find subwords - You should use string class whenever possible In this problem, you are required to do: Ask a user to enter a word. Users can enter any combination of letters regardless of their cases. (e.g. winter, Winter, winter, wiNte, ...) . For the given word, find all the "case-insensitive" sub-words whose length is greater than 2 characters and made from the letters in the user-specified word. The subwords must be in the given dictionary file, dictWords.txt file (here) You may assume the words in the file are case insensitive. . Consider the dictionary file as the source of truth. Even if the words in the dictionary don't seem correctly spelled English words, list them if they are in the file . Do not include the user entered word itself in the sub-words list. The order of letters in sub-word doesn't matter. See the example below. A subword can't have the same letter more than what's in the user entered word. See the examples below. For examples, the word, "Winter", has the list of sub-words of "win", "int", "wit", "wire", "rent", "tin", "twin", "new", ... and they all exist in dictWords.txt file. o "Winter" should not be in the list because it's the word entered by the user. o "winner" should not be in the list because it has two n's whereas "winter" has only one "n" . Here are some test results of the numbers of the subwords of the given word. . Colorado: 49 happy: 6 programming: 164 Winter: 42 The output of this program is 1. A list of subwords in the dictWords.txt file 2. A number of subwords meeting the criteria (the size of the list above) walii aardvark aardvarks aardwolf aba abaca abaci abacist aback abacus abacuses abaft abalone abalones abamp abampere abandon abandoned abandonee abandoner abandoners abandoning abandonment abandons abase abased abasement abaser abasers abases abash abashed abashedly abashes abashing abashment
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started