Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

305 mg of C6H12O6 in 55.2 mL of solution whats the molarity

Answered: 1 week ago