exsr.java
Posted in 0 comments
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package exsr;
/**
*
* @author Sewranga
*/
public class Exsr {
private String AccoutnID;
private Double AccountBal;
/**
* @return the AccoutnID
*/
public String getAccoutnID() {
return AccoutnID;
}
/**
* @param AccoutnID the AccoutnID to set
*/
public void setAccoutnID(String AccoutnID) {
this.AccoutnID = AccoutnID;
}
/**
* @return the AccountBal
*/
public double getAccountBal() {
return AccountBal;
}
public Exsr(String AccoutnID, double AccountBal) {
this.AccoutnID = AccoutnID;
this.AccountBal = AccountBal;
}
public Exsr(String AccoutnID) {
this(AccoutnID,0.0);
}
/**
* @param AccountBal the AccountBal to set
*/
public void setAccountBal(double AccountBal) {
this.AccountBal = AccountBal;
}
public double deposit (double a){
setAccountBal(getAccountBal()+a);
return getAccountBal();
}
public double withdraw (double a1){
setAccountBal(getAccountBal()-a1);
return getAccountBal();
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package exsr;
/**
*
* @author Sewranga
*/
public class Exsr {
private String AccoutnID;
private Double AccountBal;
/**
* @return the AccoutnID
*/
public String getAccoutnID() {
return AccoutnID;
}
/**
* @param AccoutnID the AccoutnID to set
*/
public void setAccoutnID(String AccoutnID) {
this.AccoutnID = AccoutnID;
}
/**
* @return the AccountBal
*/
public double getAccountBal() {
return AccountBal;
}
public Exsr(String AccoutnID, double AccountBal) {
this.AccoutnID = AccoutnID;
this.AccountBal = AccountBal;
}
public Exsr(String AccoutnID) {
this(AccoutnID,0.0);
}
/**
* @param AccountBal the AccountBal to set
*/
public void setAccountBal(double AccountBal) {
this.AccountBal = AccountBal;
}
public double deposit (double a){
setAccountBal(getAccountBal()+a);
return getAccountBal();
}
public double withdraw (double a1){
setAccountBal(getAccountBal()-a1);
return getAccountBal();
}
}
0 comments:
Post a Comment