public class BankAccount { public int accNum; public String name; public double balance; /* ============================================== convToString(): return a String containing information of BankAccount ============================================== */ public String convToString( ) { return( "Account number: " + this.accNum + ", Name: " + this.name + ", Balance: " + this.balance); } /* ============================================== deposit(amount): Add "amount" to balance ============================================== */ public void deposit( double amount ) { this.balance += amount; } /* ====================================================== withdraw(amount): Subtract "amount" from balance ====================================================== */ public void withdraw( double amount ) { if ( this.balance >= amount ) this.balance -= amount; // Subtract "amount" from balance } }