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

為了賬號安全,請及時綁定郵箱和手機立即綁定

附上代碼,歡迎討論指導(dǎo)!

public class UserController {
? ?public static void main (String[]args){
? ? ? ?System.out.println("HelloWorld!");
? ? ? ?System.out.println("歡迎使用達達租車系統(tǒng)");
? ? ? ?System.out.println("確定租車請輸入1,退出輸入0");
? ? ? ?Scanner scanner = new Scanner(System.in);
? ? ? ?String sr = scanner.next();
? ? ? ?//判斷是否租車
? ? ? ?pdzc(sr);
? ? ? ?Car [] cars ={
? ? ? ? ? ? ? ?new PK("皮卡",100,1,"皮卡型"),
? ? ? ? ? ? ? ?new ZK("大巴車",200,5,"載客型"),
? ? ? ? ? ? ? ?new ZR("大貨車",300,6,"載貨型")};
? ? ? ? ? ? ? ?int i =1;
? ? ? ? ? ? ? ?for (Car as:cars) {
? ? ? ? ? ? ? ?System.out.println("序號:"+ i++ +",車輛型號:"+as.getTx()+",車輛名稱:"+as.getCarName()+",車輛動力:"+as.getPl()+",車輛日租金:"+as.getCarDj());
? ? ? ? ? ?}
? ? ? ?System.out.println("請輸入相應(yīng)序號");
? ? ? ?//選擇序號
? ? ? ?int xh1 = Integer.parseInt(scanner.next());
? ? ? ?int xh = xh1-1;
? ? ? ?System.out.println("序號:"+ xh1 +",車輛型號:"+cars[xh].getTx()+",車輛名稱:"+cars[xh].getCarName()+",車輛動力:"+cars[xh].getPl()+",車輛日租金:"+cars[xh].getCarDj());
? ? ? ?System.out.println("請輸入租車天數(shù)");
? ? ? ?//租車天數(shù)
? ? ? ?double ts = Double.parseDouble((scanner.next()));
? ? ? ?double hjzj = ?cars[xh].getCarDj()*ts;
? ? ? ?System.out.println("租車型號如上,租車天數(shù):"+ts+"天,合計租金:"+ hjzj+"元整。");
? ?}

? ?public static void pdzc(String sr){
? ? ? ?if("1".equals(sr)){
? ? ? ? ? ?System.out.println("歡迎進入達達租車系統(tǒng),以下為租車價目表。");
? ? ? ? ? ?return;
? ? ? ?}
? ? ? ?System.out.println("歡迎再次使用達達租車系統(tǒng)");
? ? ? ?//結(jié)束程序
? ? ? ?System.exit(0);
? ?}


正在回答

2 回答

???newPK?new ZKnew ZR

0 回復(fù) 有任何疑惑可以回復(fù)我~

....

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

附上代碼,歡迎討論指導(dǎo)!

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

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

公眾號

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