public static int calculateNumberOfWaysToGetChange(int num, int type){
        int next_type = 0;
        if(type == QUARTER) next_type = DIME;
        else if(type == DIME) next_type = NICKEL;
        else if(type == NICKEL) next_type = PENNY;
        else if(type == PENNY) return PENNY;

        int ways = 0;
        for(int i = 0; i * type <= num; i++){
            ways += calculateNumberOfWaysToGetChange(num - i * type, next_type);
        }
        return ways;
    }