package dxnCalc; /** * Copyright (C) 1998 Dung X. Nguyen. All rights Reserved. */ public class AddOp implements IBinOp { public final static AddOp Singleton = new AddOp(); private AddOp() { } /** * Peform n1 + n2, and return the result. * @param n1 * @param n2 * @return */ public int compute(int n1, int n2) { return n1 + n2; } }