Rewrite your c program in project 1 to compute the number


Project-

1- Rewrite your C++ program in Project 1 to compute the number of words, average length and lengths of the words in the text file words.txt - the input file. Each line in the input file contains exactly one word. The words in the input file are sorted lexicographically in dictionary style. Use an array histogram_words of constant length to compute and store the lengths of the words in the input file. Write the computed statistics into another text file words_statistics.txt - the output file. The output file will contain a line (or lines) at the beginning of the file explaining the output. This is followed by the computed word length statistics.

2- Amend your program to compute the total number of letters and the probability of letters [a - z] in the input file. Use an array histogram_letters of constant length to compute and store the probability of letters in the input file. Write the computed statistics into the output file following the word length statistics. Compare the computed letter probabilities to published data on the Web.

3- The C++ program will be comprised of a main function and a function words_statistics that computes and outputs the computed statistics. The program will include all necessary checks and assertions.

4- Submit a printed report including the full, complete, and documented C++ program and a print-out of the output file. Use formatting instructions to make the layout neat and easy to read.

Attachment:- words.rar

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Rewrite your c program in project 1 to compute the number
Reference No:- TGS01571560

Expected delivery within 24 Hours