public class Methods {
    
    /** = the number of roaches in a room after 6 weeks, beginning with
     start roaches and multiplying at rate of rate percent per week 
     e.g. a rate of 25 means that it grows by 25% each week)*/
    public static int roaches(int start, double rate) {
        int w= 0;             // week number
        int population= start; // number of roaches after week 0
        
        // Calculate number of roaches after week 1
        population= (int) (population * (1+rate/100));
        w= w+1;
        
        // Calculate number of roaches after week 2
        population= (int) (population * (1+rate/100));
        w= w+1;
        
        // Calculate number of roaches after week 3
        population= (int) (population * (1+rate/100));
        w= w+1;
        
        // Calculate number of roaches after week 4
        population= (int) (population * (1+rate/100));
        w= w+1;
        
        // Calculate number of roaches after week 5
        population= (int) (population * (1+rate/100));
        w= w+1;
        
        // Calculate number of roaches after week 6
        population= (int) (population * (1+rate/100));
        w= w+1;
        
        return population;
    }
    
    /** = name for n, 10 <= n <= 19 */
    public static String teenName(int n) {
        if (n==10) return "ten";
        if (n==11) return "eleven";
        if (n==12) return "twelve";
        if (n==13) return "thirteen";
        if (n==14) return "fourteen";
        if (n==15) return "fifteen";
        if (n==16) return "sixteen";
        if (n==17) return "seventeen";
        if (n==18) return "eighteen";
        return "nineteen";
    }
}