Morgan Stanley interview question

Scala exercises, pattern matching, case classes