/** * A simple bank account implementation (partial) - CSE142 lecture 1/15/03 * @author Hal Perkins */ public class BankAccount { // instance variables private int number; // account number private String name; // account name private double balance; // account balance /** Return the current balance of this BankAccount */ public double getBalance() { return balance; } /** Return this BankAccount's name */ public String getName() { return name; } /** Return this BankAccount's number */ public int getNumber() { return number; } /** set this BankAccount's name to newName */ public void setName(String newName) { name = newName; } /** set this BankAccount's number to newNumber */ public void setNumber(int newNumber) { number = newNumber; } /** Deposit amount in this BankAccount */ public void deposit(double amount) { } /** Initialize a new BankAccount with the given * account name and number and a balance of 0.0 */ public BankAccount(int accountNumber, String accountName){ number = accountNumber; name = accountName; balance = 0.0; } }