public static List<COIN> getCoinsForAmount(float amount)
    {
        List<COIN> coins = new ArrayList<COIN>();

        /*
            Well, the canadian govt has decided to abandon 1 cent penny. So, we
            can't dispense exact change, but will do closest to 5 cent change.

            I am just implementing it using Greedy algorithm, but it's the classic
            'knapsack' algorithm design problem which can be solved in multiple ways.
            Just to be clear, that problem is about selecting the minimum number of coins to
            equal the denomination of the input amount, which, AFAIK, is an NP-Hard problem.
         */
        System.out.println("Amount input = " + amount);

        int numberOfToonies = (new Float(amount / TOONIE.getValue())).intValue();
        float amountToBeReturned = numberOfToonies * TOONIE.getValue();
        float leftOverAmount = amount - amountToBeReturned;
        System.out.println("Amount in Toonies = " + amountToBeReturned);
        for(int i = 0; i < numberOfToonies; i++)
            coins.add(TOONIE);

        int numberOfLoonies = (new Float(leftOverAmount / LOONIE.getValue())).intValue();
        amountToBeReturned = numberOfLoonies * LOONIE.getValue();
        leftOverAmount -= amountToBeReturned;
        System.out.println("Amount in Loonies = " + amountToBeReturned);
        for(int i = 0; i < numberOfLoonies; i++)
            coins.add(LOONIE);

        int numberOfFiftyCent = (new Float(leftOverAmount / FIFTY_CENT.getValue())).intValue();
        amountToBeReturned = numberOfFiftyCent * FIFTY_CENT.getValue();
        leftOverAmount -= amountToBeReturned;
        System.out.println("Amount in Fifty Cents = " + amountToBeReturned);
        for(int i = 0; i < numberOfFiftyCent; i++)
            coins.add(FIFTY_CENT);

        int numberOfQuarters = (new Float(leftOverAmount / QUARTER.getValue())).intValue();
        amountToBeReturned = numberOfQuarters * QUARTER.getValue();
        leftOverAmount -= amountToBeReturned;
        System.out.println("Amount in Quarters = " + amountToBeReturned);
        for(int i = 0; i < numberOfQuarters; i++)
            coins.add(QUARTER);

        int numberOfDimes = (new Float(leftOverAmount / DIME.getValue())).intValue();
        amountToBeReturned = numberOfDimes * DIME.getValue();
        leftOverAmount -= amountToBeReturned;
        System.out.println("Amount in Dimes = " + amountToBeReturned);
        for(int i = 0; i < numberOfDimes; i++)
            coins.add(DIME);

        int numberOfNickels = (new Float(leftOverAmount / NICKEL.getValue())).intValue();
        amountToBeReturned = numberOfNickels * NICKEL.getValue();
        leftOverAmount -= amountToBeReturned;
        System.out.println("Amount in Nickels = " + amountToBeReturned);
        for(int i = 0; i < numberOfNickels; i++)
            coins.add(NICKEL);

        DecimalFormat currencyFormat = new DecimalFormat("#.##");
        System.out.println("Not returning coins for amount = " + currencyFormat.format(leftOverAmount));

        return coins;
    }