Question: After the in - lab session, you are required to extend the functionality of your WordCounter by incrementing the word count for each word and

After the in-lab session, you are required to extend the functionality of your WordCounter by incrementing the word count for each word and printing the report. Follow the additional specifications below:
1. incrementWordCount Function:
Implement a function void incrementWordCount(????) in the WordCounter class that increments the count of occurrences for a word. Determine the appropriate arguments for this function.
2. printReport Method:
Implement a method void printReport(vector& v) in your main program.
This method should contain a cout statement that prints a report with each word and the number of times it occurred in the text file.
3. Integration:
Integrate the incrementWordCount function and printReport method into your main program.

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 Databases Questions!