Source code for the scala assignments