/** Lab 06. Writing recursive methods */
public class Rec {
    /** = sum of the digits in the decimal representation of n.
          e.g. sumDigits(0) = 0, sumDigits(3) = 3, sumDigits(34) = 7. 
          Precondition: n >= 0. */
    public static int sumDigits(int n) {
        
        return 0;
    }
    
    /** = the number of 2's in the decimal representation of n.
          e.g. number2(0) = 0, number2(2) = 1, number2(234252) = 3.
          Precondition: n >= 0. */
    public static int number2(int n) {
        
        return 0;
    }
    
    /** = The number of times that c divides n,
          e.g. into(5,3) = 0 because 3 does not divide 5.
          e.g. for n = 3*3*3*3*7, into(n,3) = 4.
          Precondition: n >= 1. */
    public static int into(int n, int c) {
        
        return 0;
    }
    
      
    /** = " number of times c occurs in s. */
    public static int numberc(char c, String s) {
        return 0;
    }

    /** = " s but with the FIRST occurrence of 
        character c removed (if present). */
    public static String removeFirst(String s, char c) {
        return "";
    }

    
    /** = String s with each character duplicated */
    public static String dup(String s) {
        return "";
    }
    
    /** = " s but with all occurrences of character c removed. */
    public static String removeC(String s, char c) {
        return "";
    }
    
   /** = the sum of the integers in s.
          Precondition: s contains at least one integer and
               has the form <integer>:<integer>:...:<integer>.
          e.g. sumInts("34") = 34.
          e.g. sumInts("7:34:1:2:2") is 46. */
    public static int sumInts(String s) {
        return 0;
    }

    
    /** = " number of chars in s that are not c. */
    public static int numberNotc(char c, String s) {
        return 0;
    }
 
    
    /** = String s with adjacent duplicates removed: e.g.
          for s = "abbcccdeaaa", the answer is "abcdea".*/
    public static String rem1(String s) {
        return "";
    }
    /** = the reverse of s. e.g. rev("abc") is "cba".
          Do this one using this idea. To reverse a string
          that contains at least 2 characters, switch the
          first and last ones and reverse the middle.
     */
    public static String rev(String s) {
        return "";   
    }
    
    /** = Fibonnaci number F(n).
          Precondition: n ³0.
          Definition: F(0) = 0, F(1) = 1, and
          for n > 1,  F(n) = F(n-1) + F(n-2).
          E.g. the first 10 Fibonnaci numbers are
             0, 1, 1, 2, 3, 5, 8, 13, 21, 34. */
    public static int Fib(int n) {
        return 0;
    }

    /** Compute b ** c, i.e. b multiplied by itself c times.
        Also called b "to the power" c.
        Precondition: c ³ 0
        Hints: b ** 0 = 1.
               if c is even, b**c == (b*b) ** (c/2)
               if c > 0, b**c =  b * (b ** (c-1)). */
    public static int exp(int b, int c) {
        return 0;
    }
    
}