Defines a MethodObject class which implements Kent Beck's "method object"