ShortCalculator.java 456B

1234567891011121314151617181920212223
  1. public class ShortCalculator {
  2. public short sum(short a, short b){
  3. return (short)(a + b);
  4. }
  5. public short difference(short a, short b){
  6. return (short)(a - b);
  7. }
  8. public short product(short a, short b){
  9. return (short)(a * b);
  10. }
  11. public short quotient(short a, short b){
  12. return (short)(a / b);
  13. }
  14. public short remainder(short a, short b){
  15. return (short)(a % b);
  16. }
  17. }