/* * BankAccount.java * * Created on January 30, 2005, 12:22 PM */ /** * Complete the BankAccount Class */ public class BankAccount implements Comparable { private String id; private double balance; /** Creates a new instance of BankAccount * @param newId the id of the customer */ public BankAccount(String newId) { // your code goes here } // end constructor /** Gets the customer's id * @return the id as a String */ public String getId() { // your code goes here replacing return ""; }// end getId /** Gets the customer's balance * @return the balance as a double */ public double getBalance() { // your code goes here replacing return 0; }// end balance /** Process a deposit * @param deposit the amount deposited */ public void deposit(double deposit) { // your code goes here }// end deposit /** Process a withdrawal * @param withdrawal the amount withdrawn */ public void withdraw(double withdrawal) { // your code goes here }// end withdraw /** Check if BankAccounts are equal * @param a BankAccount object * @return true if id's match */ public boolean equals(Object rhs) { // your code goes here replacing return true; } // end equals public String toString() { // your code goes here replacing return ""; } // end toString public int compareTo(BankAccount acct) { // your code goes here replacing return 0; } }// end BankAccount