ShortCalculator.java 480B

1234567891011121314151617181920212223
  1. public class ShortCalculator{
  2. public short shortSum(short x, short y){
  3. return (short)(x+y);
  4. }
  5. public short shortDifference(short x, short y){
  6. return (short)(x-y);
  7. }
  8. public short shortProduct(short x, short y){
  9. return (short)(x*y);
  10. }
  11. public short shortQuotient(short x, short y){
  12. return (short)(x/y);
  13. }
  14. public short shortRemainder(short x, short y){
  15. return (short)(x%y);
  16. }
  17. }