/** Simple model of a bank account. * Pretty much as presented in lecture 4/11/2003. */ public class BankAccount { private int number; //The account number private String ownerName; //Name of the owner of the account private double balance; //current balance in the account /** Constructor, with default values (not necessarily reasonable). */ public BankAccount() { number = 1; ownerName = "Martin"; balance = 2.00; } /** Tell the current balance in the account. */ public double getBalance() { return balance; } /** Tells who the owner of this bank account is. */ public String getName() { return ownerName; } /** Command to change the name of the owner. * Parameter is the new name of the owner (or name of the new owner). */ public void setName(String theNewName) { ownerName = theNewName; } /** Command to change the number of the account. */ public void setNumber(int newNumber){ number = newNumber; } /** Command to change the balance of the account. */ public void setBalance(double newBalance){ balance = newBalance; } //end class BankAccount }