Scala setter and getter example

Implementation of setter and getter in Scala