println accepts any numeric type
150.0, 100.0, and 150.0 respectively.
Rectangle r = new Rectangle(20, 30, 100, 100);
g2.setColor(Color.red);
g2.fill(r);
The argument in line 2 could also be new Color(1F,0F,0F);
public void combine(BankAccount b) {
deposit(b.getBalance());
b.withdraw(b.getBalance()); }
It would also be possible to replace the last instruction by
b.balance = 0;
public Purse(Purse p) {
nickels = p.nickels;
dimes = p.dimes;
quarters = p.quarters; }