欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    BAM银行账户管理系统java类Word文档下载推荐.docx

    • 资源ID:3636875       资源大小:148.34KB        全文页数:27页
    • 资源格式: DOCX        下载积分:3金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要3金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    BAM银行账户管理系统java类Word文档下载推荐.docx

    1、pli abstract class Account 属性protetd on id;protecd Srig password;rteced Stringname;poteced Stng prsonI;otectedint acuntType; preced dbe blace; /构造方法pulic Accont() uper(); pblicAccunt(long d, String pswr, Sring n, Sting prsonId, in accoutType,duleblance) sper(); this。idi; this。passord = assord; ths。a

    2、me=nam; thirsonId = prsonId; thiacuntype =cotpe; this.balance = ance;/gtX,sXx方法 ublclongetd() returnid;publc od setId(long ) ths.d i; pulic String gtPassd() reurnpasswor;pubic oid setPsord(Stg psord) hispassword =password; pblic StriggetNae() eturn ame;publc void setName(Sting nam) thisame name;ubli

    3、c StringgetPernId() eturn ersoId; publivid ePonId(tin peonId) tis.peoI = persnd;ubi in gtcountTyp() reurn ccntType;pulic vidAcuntTp(int accountType) his。accotTyp acuTye; publc doublegtaance() retur baane;publcvi setBalane(dobbaace) thisbaance = baance;/* 存款 pblcvoidepost(double ony) balance +=moe;/*

    4、 * 取款(取款方式由账户类型决定,所以设为抽象方法,相应的Accont类应设为抽象类) pulic abstract viwithdrw(doube oey);SainAcnt类pckage coqx;/* 储蓄账户类 ubic ass SavngAcou extend Accont /构造函数public Svingccout() sup(); plic SaingAont(loid, Singpasword, Srig name, Stinpersn,int accotType, dublbalance) uper(id,passwor, name,ersnI, aounType,bal

    5、ac);/对父类的wthraw()实现puli vowthdaw(dubeme) if(alance oney) ystem。out.prinln(对不起,账户余额不足!);ele blance =mone; CrsitAccont类packge com。qx;* 信用账户类,增加一个信用额度ceiling属性pblc clas Creitccontexnds Accunt prate nt cng;/构造函数pulicCredicount() suer(); pulic CrditAccoun(lon , trig asswd, Strig name, Sting personId,int

    6、accoutype, doble bnce, int ceilig) per(, psswr, nae, prnId, ccontTpe, balance);this.clin= cilig; /exx,eXx方法 publi nt geteiling() turn celing; pliid seCilng(int ceiig) thi.eilin = cing; /实现父类的withraw()pulvd ithaw(blemone) f(balance ceiling) money) ytem。outprintln(对不起,已超出您的信用额度!”); else balance = moey

    7、; Bk类pakage om.x;mpo jaa.io.ferdeaer;imprt java。ioBuffeedWrite;imprtjaa.io.il;mportja.io。;mport javao.;impotjaa。io。;mport ja.io.IOExcepti;imort ava。ul.Propties;/ Bank类 编写Bank类,属性:1当前所有的账户对象的集合,存放在数组中当前账户数量方法:1.用户开户,需要的参数:id,密码,密码确认,姓名,身份证号码,账户类型,返回新创建的Acot对象的账号, 提示:用s1。eua(s2) 可以比较s1,s2两个字符串的值是否相等账户

    8、类型是一个整数,为的时候表示储蓄账户,为1的时候表示信用账户2用户登录,参数:id,密码 返回登录账户的账号3用户存款,参数:d,存款数额,返回vod用户取款,参数:id,取款数额,返回vod.查询余额,参数:i,返回该账户的余额oube用户会通过调用Bank对象以上的方法来操作自己的账户,请分析各个方法需要的参数pulic las Bak pae ccout aconts = ew Acont20; ivate nt nmer;/账户数目rivate nt i 1001;/确定银行账号从10开始生成,即第一个账户的账号是100pubic Bak() accoun=new Acout2;/以后

    9、不足时扩容。 nubr = 0; ufRde bufReader= nll;roeies rop=Sstem。tPrortis();Sring path=propsrperty(user。dir”); y bufRadernew uferedRed(new(new ,acounttt); Strings bufRede。eadine(); hie(s != null) trinstr= pit(,”); (tr4.equas(”) ccun sagc = ne Saigccount(Long。pasLng(str), roting(), str。oring(), st3tStrng(),Ing

    10、rparseInt(tr4), DoubeparsDoule(str5); accountsnuer= saingAcc; else Accout crditAc wrediAcont(LongparseLn(st0), str。tSng(),str2oStrg(), tr3tong(),Iteger.parseI(st4), Double.prseDoube(st),50); acounsmber cditc; numbe +; +; s = bfRedrredLie(); atch (umerFormatExcepton e) / ODO Auogertedcatch blck eprin

    11、ttkTrac(); th ( e) / OD Ao-generated catchblock e。rinStakTre(); tch(Ixcetin e) / TODOut-geneatd cath ok e.priStcTa(); inal try if(ufReader != null) bufReader。clos(); ctch (IOExepon e) TDO Autogenerad catch boc e。iackTac(); /geXx,sexxpublicAcout getccount() returnacunts;pblcvoidsetAcont(ccont account

    12、s) ts。accunts =ccuts;publicint etNumber() retun numbe;pblc oidstumber(int nmbe) numbe = numr; pubic in eId() rtur i; pulic vdtd(in i) tis = id; 开户 /pli ccounopeAcont(String asw,ingpasswd, Strng name, String pson, it tpe) /创建一个新账户 ccountacoun =null;判断两次密码是否一致 if(psswd.eual(passw2)/若一致,再判断账户类型(根据type的

    13、值) if(type ) /可令开始余额为,信用额度为5000 count ewCreditAccout(id, swd1,ame, prsod,ty, 500); else accont new avigAccout(,assw1,nme,perId, typ, 0); /将账户存入账户数组accs中 /判断是否超出存储空间 if(umber= acoun.length) /扩容 Accout newAconts = e Acutccus。lngh*2; /py原来的相关数据 ysm。aacoy(accuns, 0,newAccount, ,contlenth); /将newcous赋给ac

    14、ouns accons = ewAccout; ccntsnumber acount; else ccontsnumber =ccount; Sysem.ou。prntl(开户成功!账户信息见下”); Sys。o。pintln(您的卡号为:+id+”n+”您的密码为:+passd1”您的户名为:+nmn” 您的身份证号为:”+esoId+n您的账户类型为:+type+n”); ccont。accuType= typ; numb+; d+; trn acount;/此时开户成功 else System.utprintl(对不起!您两次密码输入不匹配,开户失败!!); returnnull;/此时

    15、开户失败/ 保存数据 pblic id vActDat()BufereWit bufWrite=nu;try Popetepops=Syemgeopertie(); Stng path=props。getPropr(ueir); bufWrier=ne Buffredrier(ew (new ,”coun。txt); for(ini 0;i accouts。legth;i+) /若存在账户 f(acounti!= ull) /写入账户信息到accuxt burer。rite(ccountsi.id+”,); bufiter。wri(acountsi。getasswor()+”, bufWerw

    16、ie(accuntsigeame()+”,); uWriter。write(ccons。gePersonId()+, ufrier。rite(accosi。gAccuntype()+,”); ufWiterwrte(DubletoSring(accounti。etBalance(); bufit.nein(); lse reak; bfWriter。fuh();/清空缓存中的内容 ath (IOException ) /TODO togneated cchbck e.prtStackTrace(); fnally ry f(buWrier!=null) bufWrte。cose(); cah

    17、(Oxcption e) / ODO Ao-genertedath block prinSckTrce(); /* * 登录验证 pubiAccu verifyAcun(long id, Strngpassword) cconaccun = nl; fo(it i 0;i accousleth;i+) /若存在账户 f(acons != nll) /验证id号和pswrd if(i=acoui。tId() &aoqus(accountsi.getPasword() accunt=autsi; rek; bak; rtrcunt; * 转账验证(方法的重载) * ubic Acount vriA

    18、count(ong ) Account acount = ul;o(i i = 0;i acounts。 /若存在账户i(acci !=nul) /验证id号和assword f(d = accuntsi。gtId() account = acuntsi; brek; else bra; reur accun;* 转账*/ publi vod transfercun(Acount account1, Accont ccu2, obeoey)acont1。ithdaw(money); accoun2poit(ey); */ pubic void deosit(Accoun account,dobl moey)aount.deposit(oey); /* 取款 puliod withdr(ccount account, doble moey) acut.itdaw(one);A类packa coqx;imotio.BufferReader;impotjv。i.uffredrie;imprt aa。ioile;imort jaa.io。impot java.o.;po java。il.Proprts;importjvautlScanner;


    注意事项

    本文(BAM银行账户管理系统java类Word文档下载推荐.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开