public class Account { // private variabele: alleen bruikbaar binnen de klasse private double balance; // constructor 1: zet beginbedrag op nul public Account() { balance = 0.00; } // constructor 2: bepaalt een variabel beginbedrag public Account(double amount) { balance = amount; } // method 1: controleer stand rekening public double getBalance() { return balance; } // method 2: haal geld van de rekening af public void withdraw(double amount) { balance -= amount; } // method 3: stort geld op de rekening public void deposit(double amount) { balance += amount; } // method 4: sluit rekening af public Account close() { balance = 0.00; return null; } }