Problem of the Day: Smiley Face (update)

Straight forward implementation of my plan. Found two bugs that were my mistakes:

  1. Typo on when to decrement the counter, I used “)” instead of “(“
  2. When using the split() function I didn’t know I had to escape the “)” character because it is a reserved character. The more you know.

Otherwise it works well. I made sure to keep the functions that do the work, countPar() and print(), separate from main() which should make using a JUnit test to check it rather than calling it from main(). I should really learn how to use JUnit tests. Maybe tomorrow.