(Solved) : Write Code Cpp Codeword Generator Codeword Project Permutation Characters Alphabet One Alp Q42776996 . . .

I have to write a code in cpp a codeword generator. A codewordfor this project is any permutation of characters from an alphabet,and for this one our alphabet will be all uppercase letters{A,B,C,D … Z}. Our generator will create only codewords that willmatch a given pattern. We can use the <regex> library inorder to look for patterns in strings. To check if the string smatches the pattern std::regex_match(s, re). You will implement aclass named CodewordGenerator with two public methods: Implementation: You will implement a class named CodewordGenerator. You may design this class as you wish, but it MUST have t

I will appreciate the help, thank you!

Implementation: You will implement a class named CodewordGenerator. You may design this class as you wish, but it MUST have the following two public methods: std::string generateShortestword (std::string pattern); takes a string pattern and returns the shortest string that matches the pattern exploring the space of possible alphabet permutations in Breadth First Search order. The input string pattern is guaranteed to represent a valid regular expression pattern. std::string generateLengthWord (std::string pattern, int length); takes a string pattern and an integer n and returns a string of length n that matches the pattern exploring the space of possible alphabet permutations in Depth First Search order. Here too, the input string pattern is guaranteed to represent a valid regular expression pattern. Show transcribed image text Implementation: You will implement a class named CodewordGenerator. You may design this class as you wish, but it MUST have the following two public methods: std::string generateShortestword (std::string pattern); takes a string pattern and returns the shortest string that matches the pattern exploring the space of possible alphabet permutations in Breadth First Search order. The input string pattern is guaranteed to represent a valid regular expression pattern. std::string generateLengthWord (std::string pattern, int length); takes a string pattern and an integer n and returns a string of length n that matches the pattern exploring the space of possible alphabet permutations in Depth First Search order. Here too, the input string pattern is guaranteed to represent a valid regular expression pattern.

Expert Answer


Answer to I have to write a code in cpp a codeword generator. A codeword for this project is any permutation of characters from an…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?