Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Thank you! In this problem, you are required to do: Ask a user to enter a word. Users can enter any combination of letters

C++

image text in transcribedimage text in transcribed

Thank you!

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" o 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) 1 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" o 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) 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions