/**
 * An example that uses an OverdraftAccount object
 *
 * @version 1.0
 * @author  Prof. David Bernstein, James Madison University
 */
public class Driver
{
    /**
     * The entry point of the application
     *
     * @param args   The command line arguments
     */
    public static void main(String[] args)
    {
	double            amount;
	boolean           ok;
	OverdraftAccount  billSmith;


	billSmith = new OverdraftAccount(1001, 10000.00,5000.00);
	
	System.out.println("Account "+billSmith.getID()+
                           ": Opened with "+
			   "maximum withdrawl of "+
			   billSmith.amountAvailable());
	
	
	amount = 5000.00;
	ok = billSmith.deposit(amount);
	if (ok)
        {
	    System.out.println("Account "+billSmith.getID()+
                               ": Deposit of "+
			       amount);
	} 
        else
        {
	    
	    System.out.println("Account "+billSmith.getID()+
                               ": Unable to "+
			       "make deposit of "+amount);
	}
	

	amount = 19000.00;
	ok = billSmith.withdraw(amount);
	if (ok)
        {
	    System.out.println("Account "+billSmith.getID()+
			       ": Withdrawal of "+amount);
	} 
        else
        {
	    System.out.println("Account "+billSmith.getID()+
                               ": Unable to "+
			       "make withdrawal of "+amount);
	}
    }
}
