package cse1030.img; import java.awt.Color; import java.util.List; public class Recursion { private Recursion() { // intentionally empty and private } /** * Multiply two integers using recursive addition. * * @param m an integer * @param n an integer * @return the value m * n */ public static int multiply(int m, int n) { } /** * Determines if a list contains a given element by * recursively examining the first element of the list. * * @param t the list to search through * @param element the element to search for * @return true if element is in * the list, and false otherwise */ public static boolean contains(T element, List t) { } /** * Determines if an integer is prime. * * @param x * an integer value greater than 2 * @return true if n is prime, false * otherwise */ public static boolean isPrime(int x) { return isPrime(x, 2); } /** * Recursively determine if an integer is prime. * * @param n * an integer value greater than 2 * @param divisor * @return true if n is prime, false * otherwise */ private static boolean isPrime(int x, int divisor) { } /** * Downsample a picture n times by a factor of 2 * using recursion. See the lab problem for a description of * downsampling. * * @pre. the width and height of the picture are both multiples of 2 to the power n * @param p the picture to downsample * @param n the number of times to downsample the picture by a factor of 2 * @return the downsampled picture */ public static Picture downsample(Picture p, int n) { } /** * Create your own main method to test your methods. * * @param args */ public static void main(String[] args) { } }