Skip to content
Snippets Groups Projects
Commit 6f195d8b authored by Joel Cavat's avatar Joel Cavat
Browse files

Add snipet chpt 4

parent 38f288fc
No related branches found
No related tags found
No related merge requests found
public class Account {
private final String owner;
private double balance;
public Account(String owner, double balance) {
this.owner = owner;
this.balance = balance;
}
public Account(String owner) {
this(owner, 0.0);
}
public String getOwner() { return this.owner; }
public double getBalance() { return this.balance; }
public void deposite(double amount) { this.balance += amount; }
public void withdraw(double amount) { this.deposite(-amount); }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment