Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * DO NOT TOUCH THIS !
- */
- public class Account {
- private double balance;
- private String owner;
- public Account(String owner, double balance) {
- this.balance = balance;
- this.owner = owner;
- }
- public void deposit(double amount) {
- this.balance = this.balance + amount;
- }
- public void withdrawal(double amount) {
- this.balance = this.balance - amount;
- }
- public double balance() {
- return this.balance;
- }
- @Override
- public String toString() {
- return this.owner + " balance: " + this.balance;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement