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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

亂寫了一通好像能行哈哈哈哈

package com.imooc;


import java.util.Scanner;


public class Initail {


/**

* @param args

*/

public static void main(String[] args) {

Pickup p = new Pickup();

p.name = "皮卡";

p.busload = 4;

p.cargo = 3;

p.type = "pickup";

p.rent = 200;

Bus b = new Bus();

b.name = "南通客車";

b.busload = 20;

b.cargo = 0;

b.type = "Bus";

b.rent = 300;

Bus b1 = new Bus();

b1.name = "北京現(xiàn)代";

b1.busload = 6;

b1.cargo = 0;

b1.type = "limousine";

b1.rent = 250;

Trucks t = new Trucks();

t.name = "大卡車";

t.busload = 2;

t.cargo = 30;

t.type = "Trucks";

t.rent = 400;

Trucks t1 = new Trucks();

t1.name = "小貨車";

t1.busload = 2;

t1.cargo = 10;

t1.type = "buggy";

t1.rent = 350;

System.out.println("歡迎使用噠噠租車系統(tǒng):");

System.out.println("您是否需要租車:1.是? ? ? 0.否");

Scanner sc = new Scanner(System.in);

? ? ?int zc = sc.nextInt();

? ? ?if (zc==1){

? ? System.out.println("可租用車輛以及價(jià)格表:");

? ? System.out.println("序號(hào)\t 汽車名稱\t 租金\t\t 容量");

? ? System.out.println("1\t "+b1.name+"\t" +b1.rent+"元/天\t 載客量:"+b1.busload+"人/輛\t載貨量:"+b1.cargo+"噸/輛");

? ? System.out.println("2\t "+b.name+"\t" +b.rent+"元/天\t 載客量:"+b.busload+ "人/輛\t載貨量:"+b.cargo+"噸/輛");

? ? System.out.println("3\t "+p.name+"\t" +p.rent+"元/天\t 載客量:"+p.busload+ "人/輛\t載貨量:"+p.cargo+"噸/輛");

? ? System.out.println("4\t "+t.name+"\t" +t.rent+"元/天\t 載客量:"+t.busload+ "人/輛\t載貨量:"+t.cargo+"噸/輛");

? ? System.out.println("5\t "+t1.name+"\t" +t1.rent+"元/天\t 載客量:"+t1.busload+ "人/輛\t載貨量:"+t1.cargo+"噸/輛");

? ? ?}

? ? ?else{

? ? System.out.println("隨時(shí)歡迎您的使用~");

? ? ?}

? ? ?//獲取租車數(shù)量

? ? ?System.out.println("請(qǐng)輸入你要租賃的汽車數(shù)量:");

? ? ?Scanner sc1 = new Scanner(System.in);

? ? ?int count = sc1.nextInt();

? ? ?float sum = 0;

? ? ?//循環(huán)獲取具體的車輛信息

? ? ?if(count != 0){

? ? for(int i=1;i<=count;i++){

? ? System.out.print("請(qǐng)輸入第"+i+"輛車的序號(hào):");

? ? Scanner sc2 = new Scanner(System.in);

? ? ? ? ?int num = sc2.nextInt();

? ? ? ? ?//計(jì)算費(fèi)用

? ? switch(num){

? ? case 1:

? ? sum+=b1.rent;

? ? break;

? ? case 2:

? ? sum+=b.rent;

? ? break;

? ? case 3:

? ? sum+=p.rent;

? ? break;

? ? case 4:

? ? sum+=t.rent;

? ? break;

? ? case 5:

? ? sum+=t1.rent;

? ? }

? ? }

? ? System.out.println("請(qǐng)輸入要租賃的天數(shù):");

? ? Scanner sc3 = new Scanner(System.in);

? ? ? ? ?int days = sc3.nextInt();

? ? ? ? ?sum = sum * days;

? ? ? ? ?

? ? ? ? ?System.out.println("您一共需要支付:"+sum+"元");

? ? ? ? ?System.out.println("期待您的下次使用~");

? ? ?}

}


}

https://img1.sycdn.imooc.com//5d66316000017fe811890686.jpg

正在回答

1 回答

hahahhaha;

不知道為什么現(xiàn)在打字都要加分號(hào)了;

還有大括號(hào)亂入{

23333

}


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

Badwoman 提問者

快醒醒??!哈哈哈
2019-08-28 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Java入門第二季 升級(jí)版
  • 參與學(xué)習(xí)       531104    人
  • 解答問題       6286    個(gè)

課程升級(jí)!以終為始告別枯燥,在開發(fā)和重構(gòu)中體會(huì)Java面向?qū)ο缶幊痰膴W妙

進(jìn)入課程

亂寫了一通好像能行哈哈哈哈

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

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

幫助反饋 APP下載

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

公眾號(hào)

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