Question: One note of caution: C++ is case sensitive. Therefore, the word thanks is considered different from the word Thanks. Semantically, they are the same word.
One note of caution: C++ is case sensitive. Therefore, the word thanks is considered different from the word Thanks. Semantically, they are the same word. Therefore, we only want to store one instance of the word. My recommendation is to create a function in the Word class that will convert the word into lowercase before assigning it to the word data member. The constructor of the class would be an excellent place to call this function (i.e. before the word is ever stored in the member variable). To summarize: store only the lowercase versions of each word in the Word objects.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
