第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

程序運(yùn)行錯(cuò)誤,希望各位大俠們能幫幫忙

程序運(yùn)行錯(cuò)誤,希望各位大俠們能幫幫忙

瀟湘沐 2018-12-07 06:51:24
package changeGoshoopingMenu;import java.util.Scanner;public class Menu {/*登陸菜單*/public void showLoginMenu(){System.out.println("\n\t歡迎使用我行我素購(gòu)物管理系統(tǒng)\t");System.out.println("\t\t1.登 錄 系 統(tǒng)\n");System.out.println("\t\t2.退 出\n");System.out.println("******************************");System.out.println("請(qǐng)選擇,輸入數(shù)字:");}/*主菜單*/public void showMainMenu(){boolean con;do{con=false;/*輸入數(shù)字選擇菜單*/Scanner input=new Scanner(System.in);int no=input.nextInt();if(no==1){showCustMenu();}else if(no==2){showLoginMenu();}else if(no==0){showLoginMenu();}else{System.out.println("輸入錯(cuò)誤,請(qǐng)重新輸入數(shù)字:");con=true;}}while(con);}/*真情回饋*/public void showSendMenu(){boolean con;do {con=false;/*輸入數(shù)字選擇菜單*/Scanner input =new Scanner(System.in);int no=input.nextInt();if(no==1){System.out.println("執(zhí)行幸運(yùn)大放送");}else if(no==2){System.out.println("執(zhí)行幸運(yùn)抽獎(jiǎng)");}else if(no==3){System.out.println("執(zhí)行生日問候");}else if(no==0){showMainMenu(); //返回主菜單}else{System.out.println("輸入錯(cuò)誤,請(qǐng)重新輸入數(shù)字:");con=true;}}while(con);}/*客戶信息管理*/public void showCustMenu(){boolean con;do {con=false;/*輸入數(shù)字選擇菜單*/Scanner input =new Scanner(System.in);int no=input.nextInt();if(no==1){System.out.println("查詢客戶信息");}else if(no==2){System.out.println("添加客戶信息");}else if(no==3){System.out.println("執(zhí)行生日問候");}else if(no==4){System.out.println("顯示所有客戶信息");}else if(no==0){showMainMenu(); //返回主菜單}else{System.out.println("輸入錯(cuò)誤,請(qǐng)重新輸入數(shù)字:");con=true;}}while(con);}} ? package changeGoshoopingMenu; import java.util.*; public class TestMenu{ public static void main(String[] args) { boolean con=true; do{/*顯示主菜單*/ boolean con=true; Menu menu=new Menu(); menu.showLoginMenu(); /*實(shí)現(xiàn)菜單*/ Scanner input=new Scanner(System.in); int choice=input.nextInt(); switch(choice){ case 1: menu.showMainMenu(); break; case 2: System.out.println("謝謝您的使用!"); con=false; break; } }while(con); }} ?第一段代碼在eclipse上是正確的可不知道為什么第二段代碼的布爾那里還有dowhile那里是錯(cuò)的,謝謝幫忙,本人初學(xué),希望能夠得到大俠們的幫助
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 510 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)