Question: For Exercise 5.11, use the same approach that you used in Exercise 5.10 to read strings one character at a time. Adapt function printDistribution on
For Exercise 5.11, use the same approach that you used in Exercise 5.10 to read strings one character at a time. Adapt function printDistribution on p. 108 to print a diagram of word frequencies. Finally, add two optional command-line options to your program. (Optional means that the user may or may not specify them on the command line. Your program should accept them if they are specified.)
The first option, -h, should cause the program to print a usage message. The second option, -s n, where n is a positive integer, should set the threshold for the large strings. All strings with at least n characters should be included in the same category. Let 32 be the default value of n.
Download the script test_string_freq.sh
to help you test your program.





Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
