I am in the process of self teaching myself scala. I know java but I'm having a little problem implementing certain programs with scala.
I am reading a book specifically for learning scala and I'm trying to attempt one of the exercises for expanding my knowledge. 
How would you implement this in scala? I do have some idea on how to start it using Java. Your help is appreciated.