| CSCI A201/A597Takehome Quiz Three Second Summer 2000 |
Questions:
BankAccount and
BankAccount.
andnew BankAccount(5000);
BankAccount b;
BankAccount object?
System.in
Write just objects, not object variables.
Rectangle r = (5, 10, 15, 20); double x = BankAccount(10000).getBalance(); BankAccount b; b.deposit(10000); b = new BankAccount(10000); b.addCoins(new Coin(0.25, "quarters")); Purse p = null; p.addCoins(new Coin(0.25, "quarters")); Purse p = new Purse(); p.addCoins(new Coin());
BankAccount class. List all methods that
can be used to change a BankAccount object. List all methods that don't change the
BankAccount object.
b after the following operations?
BankAccount b = new BankAccount(10); b.deposit(5000); b.withdraw(b.getBalance() / 2);
b1 and b2 store objects of class BankAccount,
consider the following instructions.
Are the balances ofb1.deposit(b2.getBalance()); b2.deposit(b1.getBalance());
b1 and b2 now identical? Explain.
this reference?