import java.awt.*;
import java.applet.*;
public class WalletTest extends Applet
{
public void paint( Graphics g )
{
Wallet aWallet = new Wallet( "David" );
aWallet.receive( 150 ); aWallet.payOut( 25 );
System.out.print( "Wallet owned by " + aWallet.getOwnerName( ) );
System.out.println( " now contains $" + aWallet.getCash( ) );
boolean ok = aWallet.payOut( 500 );
if ( ok )
System.out.println( "OK, paid out $500!" );
else
System.out.println( "Not OK, unable to pay out $500!" );
System.out.print( "Wallet owned by " + aWallet.getOwnerName( ) );
System.out.println( " now contains $" + aWallet.getCash( ) );
}
}