Part 3: Graphing




Document: Software Engineering 1: Course Notes

next Tutorials
up Session 10: Week 19/20: Letter Frequencies
previous Part 2: Statistics

Part 3: Graphing

Finally: develop a further version of the program, which, instead of outputing the relative frequencies as numbers, outputs a histogram. This will be made up of lines of varying width (made up of asterisk characters) one line for each letter, from A to Z. The letter with the most occurrences should be scaled to give a line with, say, 60 *'s. Then the lines for all the others should be shorter in proportion. The display might look somewhat as follows:

 A *************
 B ******
 C **
 D ***
 E ********************
 F ******
 G *

- and so on.

Note that histograms would normally be plotted with the independent variable oriented vertically, whereas I have described an horizontal orientation here. If you have time, try to alter your program again, to yield a histogram with a vertical orientation.




Document: Software Engineering 1: Course Notes

next Tutorials
up Session 10: Week 19/20: Letter Frequencies
previous Part 2: Statistics



McMullin@ugmail.eeng.dcu.ie
Wed Mar 15 10:20:49 GMT 1995