Class QuotientWithException

java.lang.Object
QuotientWithException

public class QuotientWithException
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    QuotientWithException()  
  • Method Summary

    Modifier and Type Method Description
    static int quotient​(int number1, int number2)
    Calculate the quotient of two integers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuotientWithException

      public QuotientWithException()
  • Method Details

    • quotient

      public static int quotient​(int number1, int number2) throws java.lang.ArithmeticException
      Calculate the quotient of two integers
      Parameters:
      number1 - the numerator
      number2 - the denominator
      Returns:
      the quotient
      Throws:
      java.lang.ArithmeticException - on divide by zero