Files
algoritmi_strutturedati/src/intro/bank/ContoCorrente.java
T

32 lines
601 B
Java
Raw Normal View History

2022-05-23 23:11:51 +02:00
package intro.bank;
public class ContoCorrente {
private int balance;
private String owner;
public ContoCorrente(String owner) {
this.balance = 0;
this.owner = owner;
}
public ContoCorrente(String owner, Integer balance) {
this.balance = balance;
this.owner = owner;
}
public int getBalance() {
return balance;
}
public void setBalance(int balance) {
this.balance = balance;
}
public String getOwner() {
return owner;
}
@Override
public String toString() {
return "ContoCorrente[Owner: "+this.owner+" Balance: "+this.balance+"]";
}
}