Scala programs for Coursera class