欢迎来到天天文库
浏览记录
ID:47527811
大小:75.01 KB
页数:11页
时间:2020-01-13
《java书店管理系统源代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Java源代码publicclassloaduser{publicStringuser;publicStringpassword;booleanb1;loaduser(Strings1,Strings2){user=s1;password=s2;}voidload(){System.out.println("书店管理销售系统");System.out.println("**************************************");System.out.println("1、登录系统");System.ou
2、t.println("2、退出系统");System.out.println("**************************************");System.out.println("请选择:");intm;Scanners=newScanner(System.in);m=s.nextInt();if(m==1){for(inti=0;i<3;i++){System.out.println("请输入账户名和密码");Strings3,s4;Scannerss=newScanner(System.in);s3
3、=s.next();s4=s.next();if(user.equals(s3)&&password.equals(s4))b1=true;elseb1=false;if(i==0&&b1==false)System.out.println("用户名或密码输入错误一次,还有两次机会!");if(i==1&&b1==false)System.out.println("用户名或密码输入错误两次,还有一次机会!");if(i==2&&b1==false){System.out.println("三次输入错误,退出系统!");Sys
4、tem.exit(0);}if(b1==true){System.out.println("登录成功!");break;}}}if(m==2)System.exit(0);}packagemanger;importjava.util.ArrayList;importjava.util.Scanner;importmanger.vip;importSystem.menu;publicclassvipmanger{staticArrayListvipgroup=newArrayList();publicvip
5、manger(){vipgroup.add(newvip("001","王芳",100));vipgroup.add(newvip("002","李娜",60));vipgroup.add(newvip("003","杨丽",50));vipgroup.add(newvip("004","孙洁",150));vipgroup.add(newvip("005","肖青",300));}staticvoidaddd(){System.out.println("请一次输入编号,姓名,积分");StringS1,S2;intA;Sc
6、anners=newScanner(System.in);S1=s.next();S2=s.next();A=s.nextInt();vipv1=newvip(S1,S2,A);vipgroup.add(v1);}staticvoiddelete(){System.out.println("请输入要求删除的会员编号:");Strings;Scannerme=newScanner(System.in);s=me.next();booleanb1=true;for(inti=0;i7、s.equals(vipgroup.get(i).ID)){vipgroup.remove(i);b1=false;}if(b1)System.out.println("查无此会员!");}staticvoidcorrect(){System.out.println("请输入要修改信息的会员编号:");Stringsss;Scanners=newScanner(System.in);sss=s.next();booleanb1=true;for(inti=0;i8、ls(vipgroup.get(i).ID)){b1=false;System.out.println("请输入新的姓名和积分:");Stringss1;Scanners7=newScanner(System.in);ss1=s7.next();vipgroup.get(i).name=s
7、s.equals(vipgroup.get(i).ID)){vipgroup.remove(i);b1=false;}if(b1)System.out.println("查无此会员!");}staticvoidcorrect(){System.out.println("请输入要修改信息的会员编号:");Stringsss;Scanners=newScanner(System.in);sss=s.next();booleanb1=true;for(inti=0;i8、ls(vipgroup.get(i).ID)){b1=false;System.out.println("请输入新的姓名和积分:");Stringss1;Scanners7=newScanner(System.in);ss1=s7.next();vipgroup.get(i).name=s
8、ls(vipgroup.get(i).ID)){b1=false;System.out.println("请输入新的姓名和积分:");Stringss1;Scanners7=newScanner(System.in);ss1=s7.next();vipgroup.get(i).name=s
此文档下载收益归作者所有