资源描述:
《软件工程_银行储蓄管理系统源代码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、.word格式,packagesrc.day01;publicclassACC{//父类,以下是共有属性和方法//卡号protectedstaticlongid;//名字protectedstaticStringname;//身份证protectedstaticStringpersonId;//电子邮件protectedstaticStringemail;//密码protectedstaticlongpassword;//余额protectedstaticdoublebalance;publicACC(){}publicACC
2、(longid,Stringname,StringpersonId,Stringemail,longpassword,doublebalance){this.id=id;,专业.专注..word格式,this.name=name;this.personId=personId;this.email=email;this.password=password;this.balance=balance;}//存款方法publicstaticvoiddeposit(doublemoney){balance+=money;System.o
3、ut.println("存款成功,你存入的金额为:"+money);}publiclonggetId(){returnid;}publicvoidsetId(longid){this.id=id;}publicStringgetName(){,专业.专注..word格式,returnname;}publicvoidsetName(Stringname){this.name=name;}publicStringgetPersonId(){returnpersonId;}publicvoidsetPersonId(Stringpe
4、rsonId){this.personId=personId;}publicStringgetEmail(){returnemail;}publicvoidsetEmail(Stringemail){this.email=email;},专业.专注..word格式,publiclonggetPassword(){returnpassword;}publicvoidsetPassword(longpassword){this.password=password;}publicdoublegetBalance(){returnba
5、lance;}publicvoidsetBalance(doublebalance){this.balance=balance;}}packagesrc.day01;importjava.util.*;,专业.专注..word格式,publicclassBank{//先定义两个动态数组,其中ban用来存储借记卡数据,ba用来存储信用卡数据staticVectorban=newVector();staticVectorba=newVector();//i指借记卡卡号,每增加一个用户,i自增1//j指借记卡卡号,每增加一个用户,j
6、自增1privatestaticlongi=110000000;privatestaticlongj=610000000;publicBank(){}//判断用户办理借记卡还是信用卡的相关业务publicstaticvoidjusty(intch){booleank=true;while(k){if(ch==1){System.out.println("你将要办理借记卡业务:");break;}elseif(ch==2){System.out.println("你将要办理信用卡业务:");break;,专业.专注..word格
7、式,}else{System.out.println("输入指令错误,请重新输入:");k=false;}}}//开户方法publicstaticvoidregister(intch){justy(ch);Scannerre=newScanner(System.in);System.out.println("请输入开户的用户名:");Stringna=re.next();longkey;//两次密码不同的话循环进行p:while(true){System.out.println("请输入密码:");longpa=re.next
8、Long();System.out.println("请再次输入密码:");longpa1=re.nextLong();if(pa==pa1){key=pa1;break;,专业.专注..word格式,}else{System.out.println("两次不相同,请重新输入