|
Computer Science (CSCI)
Department |
|||
|
|||
More on Methods
(Example code and figures from Computing Concepts with Java Essentials,
3rd edition, by Cay Horstmann.
Visit www.wiley.com/college/horstmann
for information on the current edition of this excellent text.)
Designing the Public Interface
public BankAccount() |
double amt = 500; |
double rate = 5; // 5% |
private double balance |
public void withdraw(double amount) |
momsSavings.withdraw(500) |
public void withdraw(double amount) |
|
Exercise - add more methods to the BankAccount project
|