email me at borlaj@portlandschools.org
notes previous (09/07/06) submit the dump links  
 

Array HW16 - Add On

 

Copy this class for BankAcct (API here);

Add this below


 
 BankAcct allBankAccounts[] = {new BankAcct(425,"Charlie"),new BankAcct(250,"Henry"),new BankAcct(110,"Jim"),new BankAcct(525,"Henry")};
 //THEN ADD THESE METHODS TO YOUR CODE

    /**
     * Prints each bank account
     */
    public void printAccts()
    {
    }        

    /**
     * Prints each bank account that has more money than x
     */
    public void printHighAccts(int x)
    {
    }        

    /**
     * Make withdrawl of x dollars from each account
     */
    public void withdrawlFromAll(int x)
    {
    }

    /**
     * Advanced Prints each bank account that belongs to owner
     */
    public void printIndividualAccts(String owner)
    {
    }

    /**
     * Advanced - Return the bank account with the most money
     */
    public BankAcct findRichest()
    {
       return null;
    }

    /**
     * Super advanced - Sort bank acconts by how much money they have
     */
    public void sortAccounts(String owner)
    {
    }