/************************************************** * Author: Morrison * Date: 26 Apr 2021 **************************************************/ import java.math.BigInteger; import java.util.ArrayList; public class Big { public static void main(String[] args) { /*test drive your methods here. Since everything is static, * you can call them directly. */ } /** * This finds the the number of characters in a BigInteger. * @param b The big integer we are computing the number of characters of. * @return the number of characters in the BigInteger b. */ public static int length(BigInteger b) { return 0; } /** * This finds the sum of the absolute values of a list * of BigIntegers. * @param nums The numerical list we are processing * @return the sum of the absolute values of the entries in the list. */ public static BigInteger absSum(ArrayList nums) { return BigInteger.ZERO; } /** * This finds the factorial of n as a BigIntegert. * @param n The number whose factorial we are calculating. You * may assume as a precondition that n >= 0. * @return the sum of the absolute values of the entries in the list. */ public static BigInteger factorial(int n) { return BigInteger.ONE; } /** * This finds the number of ways to make an ordered display * of size k from n objects. * @param n The size of the "box" of items we are drawing from * @param k the size of the display we are creating. * @return the number of possible ordered displays of k items * from a box of n. FREE MATH * permuation(n,k) → n*(n-1)*(n-2)* .... (n - k + 1) if * 0 <= k < n, and 0 otherwise. (if n < 0, return 0). */ public static BigInteger permutation(int n, int k) { return BigInteger.ONE; } /** * This computes F(n), the nth fibonacci number. * @param n The ordinal of the Fibonacci number we wish to compute * @return The nth fibonacci number */ public static BigInteger fibonacci(int n) { return BigInteger.ZERO; } }