Introduction to Computer Science:
Assignment 15
    Sewickley Academy, 2000-2001

See Course Home Page.
 
Date Assigned: Fri Oct-20
Date Due: Mon Oct-23

1.  Histogram

Write a program which reads in a vector from the user, and prints out a histogram of the values in the vector.  The following example output demonstrates how your program should operate (note that user input is underlined):

Enter 12 numbers from 1-99: 3 9 12 9 3 15 3 3 8 12 3 12

The sorted array is:  3 3 3 3 3 8 9 9 12 12 12 15

The histogram is:
   15 *
   14
   13
   12 ***
   11
   10
    9 **
    8 *
    7
    6
    5
    4
    3 *****

Hit 'Enter' to exit.

Be sure not to use any magic numbers in your program (so the number 12, above, should be a constant, as in const int SIZE = 12;).

2.  Quiz Prep

We will have a quiz on Monday which is on all the programming material up to and including this assignment.

Good luck.

3.  Extra Credit

For those looking for some fun, interesting, and fairly challening extra credit, please take a stab at AP CS Assignment 15.  For a wee bit of extra credit, explain how checkPosition() works.  For big-time extra credit, do the whole assignment (way big-time if you get knights' tour working).

Of course, this is wholly optional and extra credit.

Have a splendiforous weekend.

DK

See Course Home Page.