class BankAccount {
private String firstname;
private String lastname;
private int ssn;
private int accountnumber = 0;
private double accountbala
public void setAccountNumber(int accountnumber) {
return accountnumber;
}
public void deposit(double amount) {
return this.accountbalance=this.accountbalance+amount;
}
...Are you trying to return in void
-return function???
This will be correct:
public int setAccountNumber(int accountnumber) {
// ^^^
return accountnumber;
}
public double deposit(double amount) {
// ^^^^^^
return this.accountbalance=this.accountbalance+amount;
}