// A class that models a bank account // Every account has a balance public class Account { // Constructor Account(double amount) { // Use the parameter to initialize the instance variable balance = amount; } // An accessor method double getBalance() { return balance; } // A mutator method void deposit(double amount) { balance = balance + amount; } // A mutator method void withdraw(double amount) { // Here we include this. to illustrate that it can be used this.balance = this.balance - amount; } // Each Account object needs a balance // so we will declare an instance variable private double balance; }