/* Interface for operands to RPN Calculator; only implement addition, subtraction, and * multiplication, as division is rather messy for polynomials. Calculator can operate * on any object that satisfies this interface. * Note that this interface is generic, and needs to be instantiated */ public interface CalculatorOperand { void addTo (T addend); // Adds addend to the operand represented by this class void subtractFrom (T subtrahend); // Ditto for subtraction void multiplyBy (T multiplicand); // Ditto for multiplication String toString(); // Provide a string representation of this operand suitable for printing }