java购物系统源代码Word格式.docx

上传人:b****2 文档编号:14755715 上传时间:2022-10-24 格式:DOCX 页数:25 大小:22.71KB
下载 相关 举报
java购物系统源代码Word格式.docx_第1页
第1页 / 共25页
java购物系统源代码Word格式.docx_第2页
第2页 / 共25页
java购物系统源代码Word格式.docx_第3页
第3页 / 共25页
java购物系统源代码Word格式.docx_第4页
第4页 / 共25页
java购物系统源代码Word格式.docx_第5页
第5页 / 共25页
点击查看更多>>
下载资源
资源描述

java购物系统源代码Word格式.docx

《java购物系统源代码Word格式.docx》由会员分享,可在线阅读,更多相关《java购物系统源代码Word格式.docx(25页珍藏版)》请在冰豆网上搜索。

java购物系统源代码Word格式.docx

booleanflag=true;

label0:

do{

if(!

flag)

break;

Scannerscanner=newScanner(System.in);

inti=scanner.nextInt();

VerifyEqualverifyequal=newVerifyEqual();

switch(i){

case1:

//'

\001'

intj=3;

do{

if(j<

1)

continuelabel0;

if(verifyequal.verify(data.manager.username,

data.manager.password)){

menu.showMainMenu();

}

if(j!

=1){

System.out.println("

\n用户名和密码不匹配,请重新输入:

"

);

}else{

\n您没有权限进入系统!

谢谢!

flag=false;

j--;

}while(true);

case2:

\002'

if(verifyequal.verify(data.manager.username,

data.manager.password)){

System.out.print("

请输入新的用户名:

data.manager.username=scanner.next();

请输入新的密码:

data.manager.password=scanner.next();

System.out.println("

用户名和密码已更改!

\n请选择,输入数字:

}else{

抱歉,你没有权限修改!

flag=false;

}

case3:

\003'

System.out.println("

谢谢您的使用!

//flag=false;

System.exit(0);

default:

System.out.print("

\n输入有误!

请重新选择,输入数字:

"

}

}while(flag);

}

2VerifyEqual.java

*验证管理员登录

publicclassVerifyEqual{

publicVerifyEqual(){

publicbooleanverify(Strings,Strings1){

System.out.print("

请输入用户名:

Scannerscanner=newScanner(System.in);

Strings2=scanner.next();

请输入密码:

scanner=newScanner(System.in);

Strings3=scanner.next();

returns2.equals(s)&

&

s1.equals(s3);

3CustManagement.java

publicclassCustManagement{

publicCustManagement(){

publicvoidsetData(Stringas[],doublead[],intai[],Stringas1[],

intai1[]){

goodsName=as;

goodsPrice=ad;

custNo=ai;

custBirth=as1;

custScore=ai1;

publicvoidreturnLastMenu(){

\n\n请按'

n'

返回上一级菜单:

do

if(scanner.next().equals("

n"

)){

Menumenu=newMenu();

menu.setData(goodsName,goodsPrice,custNo,custBirth,

custScore);

menu.showCustMMenu();

}else{

输入错误,请重新'

返回上一级菜单:

flag=false;

while(!

flag);

publicvoidadd(){

System.out.println("

购物管理系统>

客户信息管理>

添加客户信息\n\n"

请输入会员号(<

4位整数>

):

inti=scanner.nextInt();

请输入会员生日(月/日<

用两位数表示>

Strings=scanner.next();

请输入积分:

intj=scanner.nextInt();

intk=-1;

intl=0;

do{

if(l>

=custNo.length)

if(custNo[l]==0){

k=l;

l++;

}while(true);

custNo[k]=i;

custBirth[k]=s;

custScore[k]=j;

新会员添加成功!

returnLastMenu();

publicvoidmodify(){

修改客户信息\n\n"

请输入会员号:

会员号生日积分"

------------|------------|---------------"

intj=-1;

intk=0;

if(k>

if(custNo[k]==i){

System.out.println((newStringBuilder()).append(custNo[k])

.append("

\t\t"

).append(custBirth[k]).append("

.append(custScore[k]).toString());

j=k;

k++;

if(j!

=-1){

System.out

.println("

****************************************\n"

System.out.println("

\t\t\t\t1.修改会员生日.\n"

\t\t\t\t2.修改会员积分.\n"

System.out.print("

请选择,输入数字:

switch(scanner.nextInt()){

请输入修改后的生日:

custBirth[j]=scanner.next();

生日信息已更改!

请输入修改后的会员积分:

custScore[j]=scanner.nextInt();

会员积分已更改!

}else{

抱歉,没有你查询的会员。

}

publicvoidse

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销 > 人力资源管理

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1