Add an example of a scala class.

This should look fairly familiar to just about any java developer.
public is the default access specifier in scala, so we can leave
that off when defining public fields. Otherwise, we use private
to make fields not public.

The method add() does nto return a value, as indicated by its return
type of Unit.  Also note that parameters passed to scala methods
are always vals, so attempting to reassign their values is a
compile-time error.
Shorten ChecksumAccumulator's methods.

We can leave off the Unit return type and equals sign and give
add() a procedure-like definition instead.

Methods that only calculate a single value don't need a return,
so we can remove that from checksum().

Finally, the bodies of both methods are small enough to fit on
one line each. In fact, for checksum(), which only has a single
expression, we can even leave off the curly braces.
Fun with procedures and methods that return Unit.

Methods f and g, even though they look like they should return a
string, do not, because of how they were declared (to return Unit).

Only h() will return a string (though you should specify the return
type, scala can infer that h() does in fact return a string, as it's
the last expression produced by the method and there's an equals sign
indicating a return).