java get银行练习题
Posted 薛岩
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java get银行练习题相关的知识,希望对你有一定的参考价值。
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())); }
//实现了存钱的功能
以上是关于java get银行练习题的主要内容,如果未能解决你的问题,请参考以下文章
Java基础知识综合练习_使用集合存储_高级银行系统的搭建(注册登录存取款本行转账跨行转账销户特殊操作参数多个客户对象存入到银行类的集合,多个银行对象存入总测试类集合)