Added ch17 exercises

I used smart matching for the input validation - not really worth it, though.