zoukankan      html  css  js  c++  java
  • 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()));
            }
         
    //实现了存钱的功能
  • 相关阅读:
    页面的加载过程
    free 命令
    linux chmod命令(转)
    less 命令(转)
    cat 命令(转)
    cp 命令(转)
    mv命令(转)
    rm 命令(转)
    mkdir命令
    Docker网络基础
  • 原文地址:https://www.cnblogs.com/zzyu/p/5505620.html
Copyright © 2011-2022 走看看