码迷,mamicode.com
首页 > 其他好文 > 详细

代码2

时间:2018-09-24 18:33:55      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:0.00   bsp   res   改密码   void   break   account   账号   使用   

 

 

package Account;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.*;
public class AccountManager {
public static void main(String[] args){
Account comd[]=new Account[5];
comd[0]=new Account("20173492","GaoXinYue","777777",66666);
comd[1]=new Account("20173366 ","asdasd","888888",2000);
comd[2]=new Account("20183492","王某","456789",3000);
comd[3]=new Account("20193492 ","刘某","456120",2000);
comd[4]=new Account("20203492","田某","561273",1500);

System.out.println("***************************************************************");
System.out.println(" 欢迎使用中国工商银行自动柜员系统 ");
System.out.println("***************************************************************");
System.out.println(" 请输入您的账号:");
System.out.println("***************************************************************");
Scanner sc = new Scanner (System.in);
@SuppressWarnings("unused")
int [] passworld={777777,888888,456789,456120,561273};
int t = sc.nextInt();
int [] ID={20173492,20173366,20183492,20173492,20203492};
if (t!=ID[0]&&t!=ID[1]&&t!=ID[2]&&t!=ID[3]&&t!=ID[4])System.out.println("该账号不存在");
else if (t==ID[0]||t==ID[1]||t==ID[2]||t==ID[3]||t==ID[4])
{
System.out.println("该账号存在");
System.out.println("***************************************************************");
System.out.println(" 欢迎使用中国工商银行自助柜员系统 ");
System.out.println("***************************************************************");
System.out.println(" 请输入您的密码:");
System.out.println("***************************************************************");
Scanner sce = new Scanner (System.in);
int ed=sce.nextInt();
if(ed!=passworld[0]&&ed!=passworld[1]&&ed!=passworld[2]&&ed!=passworld[3]&&ed!=passworld[4])System.out.println("密码不对");
else if((t==ID[0]&&ed==passworld[0])||(t==ID[1]&&ed==passworld[1])||(t==ID[2]&&ed==passworld[2])||(t==ID[3]&&ed==passworld[3])||(t==ID[4]&&ed==passworld[4]))
{
String it="";
do
{
int i=0;
int k=0;
int j=0;
double n=0;
Account ae = null;
System.out.println(" 欢迎使用中国工商银行自助柜员系统 ");
System.out.println("***************************************************************");
System.out.println(" 1.存款");
System.out.println(" 2.取款");
System.out.println(" 3.转账汇款");
System.out.println(" 4.修改密码");
System.out.println(" 5.查询余额");
System.out.println("***************************************************************");
Scanner eds = new Scanner (System.in);
it=eds.next();

switch(Integer.parseInt(it))
{
case ‘1‘:
{
ae.menu(i);
Scanner sced = new Scanner (System.in);
int aed=sce.nextInt();
while(aed<0||aed-(int)aed>0.00001)
{
System.out.println("输入金额有误");
ae.menu(i);
aed=sce.nextInt();
}
ae.cunkuan(aed, i);
};break;
case ‘2‘:
{

}
case ‘3‘:

{
ae.huikuan(i);
int zhanghu;
Scanner qw = new Scanner (System.in);
int zhuanghu=qw.nextInt();
ae.zhuanzhang(i)
}
case ‘4‘:
{
ae.xiugaimima(i);
Scanner qw = new Scanner (System.in);
int ymi1=qw.nextInt();
Scanner qwe = new Scanner (System.in);
int nmi1=qwe.nextInt();
Scanner qwer= new Scanner (System.in);
int nmi2=qwer.nextInt();

}
}
}while (it.compareTo("q")!=0);
}

}
}
}

代码2

标签:0.00   bsp   res   改密码   void   break   account   账号   使用   

原文地址:https://www.cnblogs.com/muailiulan/p/9696079.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!