package mianxiangduixiang;
import java.nio.charset.MalformedInputException;
//银行
public class getyinhang {
String zhanghu ;
double cunkuanyue;
double zhanghuyue;
public String getZhanghu() {
return zhanghu;
}
public void setZhanghu(String zhanghu) {
this.zhanghu = zhanghu;
}
public double getCunkuanyue() {
return cunkuanyue;
}
public void setCunkuanyue(double cunkuanyue) {
this.cunkuanyue = cunkuanyue;
}
public double getZhanghuyue() {
return zhanghuyue;
}
public void setZhanghuyue(double zhanghuyue) {
this.zhanghuyue = zhanghuyue;
}
//行为
//显示名字
private void showzhanghuyue()
{
System.out.println("您的账户余额"+this.zhanghuyue);
}
//构造方法
public getyinhang(String zhanghu, double cunkuanyue, double zhanghuyue)
{
super();
this.zhanghu = zhanghu;
this.cunkuanyue = cunkuanyue;
this.zhanghuyue = zhanghuyue;
}
public getyinhang(String zhanghu) {
super();
this.zhanghu = zhanghu;
}
public static void main(String[] args) {
getyinhang zhanghu1 =new getyinhang("13646449991");
zhanghu1.setCunkuanyue(1235);
zhanghu1.setZhanghuyue(1358);
System.out.println("您的账户是"+zhanghu1.getZhanghu()+"余额还有"+(zhanghu1.getZhanghuyue()+zhanghu1.getCunkuanyue()));
}
//实现了存钱的功能