Question
Assembler Program: Line/Word/Character Count On a Linux system, the system program wc counts the number of lines, words, and characters in a file. You will
Assembler Program: Line/Word/Character Count
On a Linux system, the system program wc counts the number of lines, words, and characters in a file. You will duplicate the functionality of wc as an assembler program. Additionally, many applications require that the character frequency be determined. The Huffman encoding algorithm is one such example. As part of this program, you will also need to determine the frequency of each of the characters that are processed.
For this program, you will be expected to complete the following tasks: 1. Read lines entered from the keyboard or from a file. 2. Echo each input line. 3. Output the list of words from the line that was input. 4. Allow the user to continue entering lines (i.e. allow the user to do steps 1-3 continuously) until a blank line is entered. 5. Output the total number of lines, words, and characters. 6. Output the frequency of each of the characters.
Please consider the following:
Be sure to print a title and "user-level" description at the beginning of your executed program so the user knows what the program is doing.
Be sure to label your output so it is clear what each output section is doing in relation to the assigned tasks. White spaces or other types of separators in the output will be very helpful in making the output easier to read and understand. You should also comment the code properly.
Be sure to display appropriate prompts for the user input and appropriate labels for the program output.
Provide an analysis of the program that includes the following three points:
(a) A review of the complexity of your program in terms of Big-O notation that shows your "work" in determining the complexity.
(b) A review of any interesting conclusions that might be drawn from the data produced from your program. For example, consider average word lengths or distribution of character frequencies. Typically, these types of conclusions would be drawn from running the program on several different data sets.
(c)Identification of any parts of your program that are not working correctly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started