Advance Programming with Scala homework1