Question: Read a text file and output: - The alphabetic character ( s ) that appear most frequently in the file ( note: for all counts,

Read a text file and output: - The alphabetic character(s) that appear most frequently in the file (note: for all counts, ignore the characters case. e.g. treat a and A as the same character)- The alphabetic character(s) that appear least frequently in the file - A list of the characters and their frequencies, sorted from most frequent to least frequent. Characters that appear with the same frequency should be sorted alphabetically - A bar chart displaying the frequencies of each character with the bars displaying with asterisk. The horizontal axis should be the characters from a-z with a space between each character.
Specifications - All output should be directed to the standard output device using cout. - Output formatting should match the example above and the sample output files given for the tests provided. Note the proper use of singular and plural (character/ characters, time/times) and use of commas and and when listing characters. - Your main functions signature should be: main(int argc, char * argv[])- Your program will be run with the program name followed by the name of the input file your file should open and read (argv[1]). For example, if one types ./program3 test1-input.txt at the command prompt, program3 should open test1-input.txt from the current directory, read all of the text in the file, and produce output to the standard output device (using cout)- Your main function must be implemented in program3.cpp - Place the function prototypes for all functions you write to call in your main in program3functions.h - Place the function implementations for all functions you write to call in your main in program3functions.cpp - The only header files that may be included in your code are: iostream, fstream, iomanip, cmath, cctype, and program3functions.h - You will submit a zip file (only a zip file will be accepted) containing program3.cpp, program3functions.h, and program3functions.cpp Testing Text files containing sample input and the corresponding expected output for program3 are also attached to the assignment. A makefile has been included to run your program with the sample input and compare the results to the expected output. In order to use the makefile, ensure that your program3functions.h, program3functions.cpp, and program3.cpp files and all of the files attached to the assignment (checkit.cpp, correct-test1.txt, correct-test2.txt, makefile, test1- input.txt, test2-input.txt) are in the same directory. Your program will be graded using this same method with different input/output file pairs. To run the included tests on your program, type: make program3test1 make program3test2
Example input/output pairs
Input file contents:
The quick brown fox jumps over the lazy dog.
Program's corresponding output:
Highest frequency character (appeared 4 times in the file): o
Lowest frequency characters (appeared 1 time in the file): a, b, c, d, f, g, i, j, k, l, m, n, p, q, s, v, w, x, y, and z
0: 4
e: 3
h: 2
r: 2
t: 2
u: 2
a: 1
b: 1
c: 1
d: 1
f: 1
g:1
i: 1
j: 1
k: 1
l: 1
m: 1
n: 1
p: 1
q : 1
s: 1
v : 1
w: 1
x : 1
y:1
z:1
abcdefghijklmnopqrstuvwxyz
Read a text file and output: - The alphabetic

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