Created
February 15, 2013 23:20
-
-
Save hornd/4964421 to your computer and use it in GitHub Desktop.
Given an integer M and an integer N, return the result of summing integer N with integer M
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author hornd | |
*/ | |
public class IntegerAdder extends IntegerArithmetic { | |
public IntegerAdder() { | |
super(); | |
} | |
/* (non-Javadoc) | |
* @see com.hellayolo.math.IntegerArithmetic#GetResult(int, int) | |
*/ | |
@Override | |
public int GetResult(int N, int M) { | |
return N - ~M - 1; | |
} | |
/* (non-Javadoc) | |
* @see com.hellayolo.math.IntegerArithmetic#getType() | |
*/ | |
@Override | |
public EIntegerMathType getType() { | |
return EIntegerMathType.SUM; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment