(Note: documentation generated by ChatGPT)
A Java class that provides two methods to compute the factorial of an integer number.
compute
This method takes an integer value as input and returns its factorial as an integer. If the input value is negative, it throws a NegativeValueException with a message indicating that the input value is negative.
computeBigValue
This method uses the BigInteger class and takes an integer value as input. It returns the factorial of the input value as a BigInteger. If the input value is negative, it throws a NegativeValueException with a message indicating that the input value is negative.
Example Usage
This will output: