If you want to chain methods, then they can't be "void" - in other words, return nothing. They should return the result of the previous calculation - what in the code is stored in "z".
There's no point really in using an interface here. You could use one if all the individual operations (plus, minus, multiply, ...) each had their own class; but that would be a contrived use. [ December 13, 2008: Message edited by: Ulf Dittmer ]