Question: Write a program in C ++ to scan one or more text files and count the number of occurrences of each word in those files

Write a program in C++ to scan one or more text files and count the number of occurrences of each word in those files Use a binary tree to keep track of all words. Your tree should be self-balancing using either AVL, Splay, or Red-Black tree algorithms to maximize efficiency. When all input files have been scanned, print out the results to another file.

Outcomes

After successfully completing this non-trivial program in C++, you should be able to:

Define a class of objects and operations on those objects.

Build a massive, recursive data structure comprising those objects.

Search for an item in that data structure and, if it is not found, add it to the structure.

Create a file for your output and write to it.

This Assignment

Your program must accept an indeterminate number of arguments on the command line, the first of which specifies the output file and the remaining of which specify the input files. Thus, a user could invoke your program in a Windows Command Prompt by typing

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!