| A bar chart or histogram is a typical way that is used to express statistical information in a graphical fashion. Some ads are given as a histogram. Consider this one: |
|

| Raw Data | Histogram Representation | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
A common alternative representation of a distribution is using vertical blocks,
rather than columns of x's.
The above data set might have been illustrated as follows, which gives exactly
the same information but is more time-consuming:
You have been hired by the American College Testing Service (ACT) folks to help them be able to analyze the multiple choice questions on the ACT test. In the ACT multiple choice question test, there is one right answer per question and three or four wrong answers called "distracters." The people that design the ACT want to have "good" distracters that students choose frequently, and they want to see how good their distracters are at various testing sites. The quickest way is to present the frequency distribution of the answers in a bar chart. Your task in this lab is to design a program in a file named YourLastName_306L3.cpp that displays these histograms.
Here are a couple of suggestions:
histo that take 4 or 5
integer inputs (depending on the implementation) and draw the relevant histogram
on the screen.
Examples:
histo(5, 4, 6, 2) should produce output that appears
like:
*
* *
* * *
* * *
* * * *
* * * *
-------
A B C D
|
|---|
histo(5, 4, 6, 2, 1) should produce output that appears
like:
*
* *
* * *
* * *
* * * *
* * * * *
---------
A B C D E
|
|---|
| Note: | You must display the data in this orientation, rather than turned sideways. This will require some planning. |
|---|
main() function should allow the user to input and view as many
histograms as desired.
histo functions.
// Course: CSC 306 Introduction to Programming with C++
// Name: Your Name
// Lab #3: Creating Histograms
/* Put what your program does here */