public class bank
{
private String accountNumber;
private String name;
private String email;
private double balance;
private String phoneNumber;
public bank(){
this("12345","bob","shbb@hajaj.com",1000.00,"12345");
}
public bank(String accountNumber, String name, String email, double balance, String phoneNumber)
{
this.accountNumber = accountNumber;
this.name = name;
this.email = email;
this.balance = balance;
this.phoneNumber = phoneNumber;
}
public void deposit(double balance){
this.balance += balance;
System.out.println(this.balance);
}
public void withdraw(double balance){
this.balance -= balance;
System.out.println(this.balance);
}
public void setPhoneNumber(String phoneNumber)
{
this.phoneNumber = phoneNumber;
}
public String getPhoneNumber()
{
return phoneNumber;
}
public void setBalance(Double balance)
{
this.balance = balance;
}
public Double getBalance()
{
return balance;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setAccountNumber(String accountNumber)
{
this.accountNumber = accountNumber;
}
public String getAccountNumber()
{
return accountNumber;
}
}
import java.util.*;
public class Main
{
public static void main(String[] args)
{
bank amy = new bank();
amy.deposit(200.00);
}
}