Question: Define a new C + + class named Word that manages a dictionary word ( string ) and its definition ( string ) . The

Define a new C++ class named Word that manages a dictionary word (string) and its definition (string).
The class must provide at least the following two methods:
toString method that returns the string containing all the information about the dictionary word in the following format:
WORD() DEFINITION()
For example, here is a specific word:
WORD(School) DEFINITION(An educational institution)
WORD(Computer) DEFINITION(An electronic device)
find method that accepts a search string and return true if the word or the definition contains that search string.
The method signature should looks like this:
bool find(string searchStr) const;
View keyboard shortcuts
EditViewInsertFormatToolsTable
12pt
Paragraph

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!