[Solved] Need Program Solved C Program Listed Chegg Answered Previously C C Write C Program Promp Q37267777
Need this program solved in C++. The same program has beenlisted on chegg and answered previously but in C, not C++.
Write a C++ program that prompts the user for a series ofletters. The program will read in the letters and print out whichdictionary words can be made from the provided letters. Thedictionary is provided as a text file.
In very general terms, determining if a given word can be madefrom the given letters will require counting how many distinctkinds of letters there are in the given letters and in thewords.
For example, assume that the word “bull” is in the dictionary.The word “bull” contains 1 ‘b’ character, 2 ‘l’ characters, and 1‘u’ character. Now say the input letters were “alblldi”. In“alblldi”, we have enough ‘b’ characters for “bull”, since“alblldi” contains at least 1 ‘b’ character. Similarily, “alblldi”,has enough ‘l’ characters for “bull”, since “alblldi” contains atleast 2 ‘l’ characters. However, “alblldi” does not have at least 1‘u’ character, and as such we know that we cannot make “bull” from“alblldi”.
Dictionary file
Read in the dictionary words from a file. The name of thedictionary file must be “dictionary.txt”. Make the followingassumptions about the dictionary file:
-
Each line contains the words that begin with particularletter.
-
The words in each line are separated by tab (⧵t).
-
Each word consists only of lowercase letters in the rangea-z.
-
The maximum length of a single line is 99 characters.
-
The maximum number of words is 1000.
-
If you cannot open the dictionary file, you should print “Failedto open dictionary file
‘dictionary.txt’”, followed by a newline, and then exit theprogram.
Program requirements
The program must meet the following requirements:
a. The program keeps asking the user for letters until the lettersare exit.
s://mdc.blackboard.com/webapps/blackboard/content/listContent.jsp?course_id=_93385_1&content_id=_5545163_1&mode=reset
4/16/2019 FINAL PROJECT – COP1334-2193-2677
https://mdc.blackboard.com/webapps/blackboard/content/listContent.jsp?course_id=_93385_1&content_id=_5545163_1&mode=reset2/2
-
The program prints words in the dictionary that could be made inalphabetic order, as specified in the dictionary.
-
The program prints out what letters were typed in, followed by acolon (:), followed by a list of the words that could be made (ifany).
-
Each word that could be made is prefixed by a tab character(⧵t).
-
If the user types an upper case letter your program must convertit to lower case.
-
Your program must check if each character is a valid letter ofthe English alphabet, if it is not then that character isdiscarded.
Program output
For instance, the following would be some output from yourprogram:
enter letters: alblldi alblldi:
ball bill
enter letters: moo moo:
enter letters: bleppa bleppa:
ape apple
enter letters: exit
Implementation Hint
There are a lot of different ways to perform this sort ofcounting, but the shortest way will probably involve an array of 26integers, one for each letter of the alphabet. The first index inthis array refers to the number of ‘a’ characters, the second indexthe number of ‘b’ characters, and so on.
Grading System
If the program runs your maximum grade will be 100/100
If the program doesn’t run your maximum grade will be 50/100
In either case the following will be checked during the gradingprocess:
( 5%) Indentation
( 5%) Meaningful comments (at least 1 per function, and 1 perconditional/repetition statement)
(10%) Reading the dictionary file line by line, and closing thefile correctly when finished
(15%) function that can count the number of times each characterappears in a given word
(15%) function that can determine if a word can be made giventhe letter counts for the word and the input letters.
(30%) Iterate through the dictionary, executing the above codefor each word in the dictionary. Print out the words that can bemade, using the format specified before. In other words, if yourprogram runs and does what it is supposed to do.
(20%) Answering correctly four (4) questions about your codeduring the presentation.
The text file “dictionary.txt” looks like this:
ape appleball bill bullfootparrot peebleseasonzebras zoo
I would attach it but chegg doesnt allow me to. So you wouldhave to create the txt file first and then begin writing theprogram.
Expert Answer
Answer to Need this program solved in C++. The same program has been listed on chegg and answered previously but in C, not C++. Wr… . . .
OR

