Remember your seats for Wednesday

Please confirm on the paper:

  (a) lecture where you take the exam 

  (b) lab you go to to work out the mistakes

Early Evaluation Exam 

http://www.cs.indiana.edu/classes/c212/spr2015/eee-answers.html

Average raw score for early evaluation exam: 66

You can get back between 1/3 and 1/2 of the points lost. 

Why is the exam on paper?

Typical exam problem for Wednesday:

Exam has two parts: 

  40 points: design

  60 points: implement

Write a program that receives/reads a string of characters like, for example: 

  "banana"

  "         "

  "This is quite interesting."

The program is supposed to report how many times each characters shows up in the string.

  "banana"  -> (b, 1) (a, 3) (n, 2)

  "         " -> ( , 9)

  "This is quite interesting." (T, 1) (h, 1) (i, 5) ... 





Problem two things:

  (a) 40 points design (describe approach)

  (b) 60 points program (implement your approach)

Write a program that reads (is fed) a string of characters.

The program should report how many times each character appears.

Examples: 

  "banana" --> (b, 1) (a, 3) (n, 2)

  "looking forward to wednesday" --> (l, 1) (o, 4) (k, 1) (i, 1) (n, 2) ... 

  "     " --> ( , 5)







Analysis and design:

for every letter in the input:
  if I have seen it before:
    skip it
  else 
    remember it (so you can tell you've seen it before later) 
    count how many times it occurs and report it

contains(c, ...) -> true/false

count(c, ...) -> number