Download Word.h and test_word.cpp.
1.Implement in a file Word.cpp all member functions in Word.h and add code in the main function in
test_word.cpp to test them.
2.Implement the function count_words in test_word.cpp and add code in the main function to call it.
3.Implement the function extract_words in test_word.cpp and add code in the main function to call it.
An object of class Word stores a word as a string and its frequency (int). Functions in the Word class can
set the word and its frequency, can increment or decrement a word’s frequency, can modify all letters in
word into lower case, can check if a word has only letters in it, can eliminate all non-letter characters
from it.
Except for the is_valid function which you have to do it recursively, for the other functions that can be
done recursively you get extra points for implementing them recursively. They are marked in Word.h
Explain in the function header (the comment lines before a function definition) your algorithm in a few
sentences (for the functions that require more than one line of code)
Submit Word.h, Word.cpp and test_word.cpp, and the output of the test_word.cpp.
Sample Solution