Character Counter Vector C#

0 comments

Design a program that reads in an ASCII text file (provided) and creates an output file
that contains the frequency count of how many times each character appears in the
input file. Do not sort the output. Each unique character in the file must be represented
by a character frequency class instance. For this exercise, the character frequency
objects must be processed and be stored in a vector (or equivalent). Reading the entire
file into memory is prohibited.

For example, given the sample input file: Hello.
Would yield the following output file:

(10) 1

(13) 1

.(46) 1

H(72) 1

e(101) 1

l(108) 2

o(111) 1

The character frequency class must implement the properties and methods given in the UML
diagram below. Note that the actual names of the methods can vary slightly based upon the
language used. the property get method called, “Character” would be appropriate for C#/VB.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}