Question: Objectives: Refresh CIC++ programming skills. Use C++ VO streams, string class, and STL containers and algorithms. Use makefile to organize and compile programs. Statement of

 Objectives: Refresh CIC++ programming skills. Use C++ VO streams, string class,

Objectives: Refresh CIC++ programming skills. Use C++ VO streams, string class, and STL containers and algorithms. Use makefile to organize and compile programs. Statement of Work: Implement a program that collects the statistics of word, number and character usage in a file (redirected as the standard input. I. Create a subdirectory called proj1 2 For this project you need to create at least two files: proj1.cpp, and makefile. Both files should be placed in the proj1 directory. 3. The file proj1.cpp should contain the main function, int main). In the main) function, the program should read the input (from standard input) until it reaches the end, counting the number of times each word, number, and character is used. o A word is defined as a sequence of letters (a..z or'A.Z) o Words are case insensitive ("AA". "Aa. "aA". and "aa" are the same). o A number is defined as a sequence of digits CO..9") Note that both words and numbers can be of length of 1, that is, contain one letter or one digit, respectively o Different sequences represent different numbers. For example, number "001" is different from number"1 Words are separated by numbers or other non-letter and non-digit characters. Numbers are separated by words or other non-letter and non-digit characters. o o Output specifications: Your program should track the number of times each word, number, and character o The program should then output the ten most used characters, the ten most used numbers, and the ten most used words as well as the number of times these o o Since words are case insensitive, the program only outputs lower case words The characters, numbers and words should be printed in the descending order based on the number of times they are used. o Handling ties: When two characters occur the same number of times, the character with the smaller ASCII value should be considered as being used more frequently. When two words (or numbers) occur the same number of times, the word (or number) that occurs earlier in the input should be considered as being used more frequently 4. An example executable code of the program is provided to you (see below). You should make the outputs of your program match this sample executable. When printing characters, use tfor tab and In' for newline. All other characters should be printed normally. s. Write a makefile for your project that compiles an executable called proj1x 6. You are encouraged to use any C++ STL containers and algorithms. You should also use C++ string class instead of default c-strings. Here are a few good reference links for library lookups

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!