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

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

這個(gè)程序執(zhí)行不了,哪里出錯(cuò)了

import java.util.*;
public class Test {
?public static void main(String[]args){
??car1 A1=new car1();
??car2 A2=new car2();
??car3 A3=new car3();
??car4 A4=new car4();
??car5 A5=new car5();
??car6 A6=new car6();
??int money=0;//一款車子的租金
??int moneys=0;//一天的租金
??int person=0;//一款車子的載人量
??int persons=0;//總?cè)藬?shù)
??int good=0;//一款車子的載物量
??int goods=0;//總載物量
??
??Scanner input=new Scanner(System.in);
??int x=input.nextInt();
??do{
???System.out.println("歡迎來到答答租車系統(tǒng)!");
???System.out.println("你是否要租車:1是 ,0否");
???if(x==0){
????System.out.println("期待你的下次光臨!");
???}
??}
???while(x==0);
???
????System.out.println("您可租車的類型和及其項(xiàng)目表:");
????System.out.println("序號"+? "汽車名稱"+? "租金"+??? "容量");
????if(x==1){?
?????A1.output();
?????A2.output();
?????A3.output();
?????A4.output();
?????A5.output();
?????A6.output();
???}
??class car1 {
???private int num=1;//車子的序號
???private String name="歐迪A4";//車子的名稱
???private int money=500;//一天的租金
???private int person=4;//一輛車子的載人數(shù)目
???public int getNum(){
????return num;
??}
???public String getName(){
????return name;
???}
???public int getMoney(){
????return money;
???}
???public int getPerson(){
????return person;
???}
???public void input(){
????System.out.println(getNum()+"? "+getName()+" "+getMoney()+"元/天"+""+"載人"+getPerson()+"人");
???}
???class car2{
????private int num=2;
????private String name="馬自達(dá)6";
????private int money=400;
????private int person=4;
????public int getnum2(){
?????return num;
????}
????public String getName(){
?????return name;
????}
????public int getMoney(){
?????return money;
????}
????public int getPerson(){
?????return person;
????}
????public void input(){
?????System.out.println(getNum()+"? "+getName()+" "+getMoney()+"元/天"+""+"載人"+getPerson()+"人");
????}
????class car3{
?????private int num=3;
?????private String name="皮卡雪6";
?????private int money=450;
?????private int person=4;
?????private int good=2;
?????public int getnum3(){
??????return num;
?????}
?????public String getName(){
??????return name;
?????}
?????public int getMoney(){
??????return money;
?????}
?????public int getPerson(){
??????return person;
?????}
?????public int getGood(){//皮卡雪6的載物量
??????return good;
?????}
?????public void input(){
??????System.out.println(getNum()+""+getName()+""+getMoney()+"元/天"+""+"載人"+getPerson()+"載物"+getGood()+"噸");
?????}
?????class car4{
??????private int num=4;
??????private String name="金龍";
??????private int money=800;
??????private int person=20;
??????public int getnum4(){
???????return num;
??????}
??????public String getName(){
???????return name;
??????}
??????public int? getMoney(){
???????return money;
??????}
??????public int getPerson(){
???????return person;
??????}
??????public void input(){
???????System.out.println(getNum()+""+getName()+""+getMoney()+"元/天"+""+"載人"+getPerson()+"人");
??????}
??????class car5{
???????private int num=5;
???????private String name="松花江";
???????private int money=400;
???????private int good=4;
???????public int getnum5(){
????????return num;
???????}
???????public String getName(){
????????return name;
???????}
???????public int getMoney(){
????????return money;
???????}
???????public int getGoods(){//松花江的載物量
????????return good;
???????}
???????public void input(){
????????System.out.println(getNum()+""+getName()+""+getMoney()+"元/天"+"載物"+getGoods()+"噸");
???????}
???????class car6{
????????private int num=6;
????????private String name="依維柯";
????????private int money=1000;
????????private int good=20;
????????public int getnum6(){
?????????return num;
????????}
????????public String getName(){
?????????return name;
????????}
????????public int getMoney(){
?????????return money;
????????}
????????public int getGood1(){//依維柯的載物量
?????????return good;
????????}
????????public void input(){
?????????System.out.println(getNum()+""+getMoney()+""+"載物"+getGood1()+"噸");?
????????}
????????
????????System.out.print("請輸入租車的數(shù)量:");??
????????int n=input.nextInt();//租車的數(shù)量
????????for(int i=0;i<n;i++){
?????????System.out.println("請輸入第"+(i+1)+"+輛車的序號:");
?????????int num=input.nextInt();
?????????switch(num){
??????????case 1:
???????????money=A1.getMoney();//車子的租金
???????????person=A1.getPerson();
???????????break;
??????????case 2:
???????????money=A2.getMoney();
???????????person=A2.getPerson();
???????????break;
??????????case 3:
???????????money=A3.getMoney();
???????????person=A3.getPerson();
???????????good=A4.getGood();
???????????break;
??????????case 4:
???????????money=A4.getMoney();
???????????person=A4.getPerson();
???????????break;
??????????case 5:
???????????money=A5.getMoney();
???????????goods=A5.getGood();
???????????break;
??????????case 6:
???????????money=A6.getMoney();
???????????good=A6.getGood();
???????????break;
?????????}
?????????moneys=moneys+money;
?????????persons=persons+person;
?????????goods=goods+good;
????????}
?????????
?????????System.out.println("moneys="+moneys);
?????????System.out.printn("persons="+persons);
?????????Systme.out.println("goods="+goods);
?????????System.out.println("請輸入租車天數(shù):");
?????????int days=input.nextInt();
?????????System.out.println("您的賬單:");
?????????System.out.println("所載人人數(shù)為:"+persons);
?????????System.out.println("所載貨物量為:"+goods);
?????????System.out.println("***租金總價(jià)格為:"+(moneys*days));
???????????
?????????
????????}
????????
????????
???????}
??????
?????}
????}
??

正在回答

3 回答

zhong wen shu ru fa zhao bu dao le...555555.

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

jie kou he lei de sheng ming cuo wu le .

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

import java.util.*;

public class ceshi {


public static void main(String[] args) {

// TODO Auto-generated method stub

?

?car1 A1=new car1();

?car2 A2=new car2();

?car3 A3=new car3();

?car4 A4=new car4();

?car5 A5=new car5();

?car6 A6=new car6();

?int money=0;//一款車子的租金

?int moneys=0;//一天的租金

?int person=0;//一款車子的載人量

?int persons=0;//總?cè)藬?shù)

?int good=0;//一款車子的載物量

?int goods=0;//總載物量

?

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

?System.out.println("歡迎來到答答租車系統(tǒng)!");

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

?int x=input.nextInt();

?do{

??

? if(x==0){

? ?System.out.println("期待你的下次光臨!");

? }

?}while(x==0);

??

?System.out.println("您可租車的類型和及其項(xiàng)目表:");

?System.out.println("序號"+ ?"汽車名稱"+ ?"租金"+ ? ?"容量");

?if(x==1){?

? ? A1.input();

? ? A2.input();

? ? A3.input();

? ? A4.input();

? ? A5.input();

? ? A6.input();

?}

?

?System.out.println("請輸入租車的數(shù)量:"); ?

? ? ? int n=input.nextInt();//租車的數(shù)量

? ? ? for(int i=0;i<n;i++){

? ? ? ? System.out.println("請輸入第"+(i+1)+"+輛車的序號:");

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

? ? ? ? switch(num){

? ? ? ? ?case 1:

? ? ? ? ? money=A1.getMoney();//車子的租金

? ? ? ? ? person=A1.getPerson();

? ? ? ? ? break;

? ? ? ? ?case 2:

? ? ? ? ? money=A2.getMoney();

? ? ? ? ? person=A2.getPerson();

? ? ? ? ? break;

? ? ? ? ?case 3:

? ? ? ? ? money=A3.getMoney();

? ? ? ? ? person=A3.getPerson();

? ? ? ? ? good=A3.getGoods();

? ? ? ? ? break;

? ? ? ? ?case 4:

? ? ? ? ? money=A4.getMoney();

? ? ? ? ? person=A4.getPerson();

? ? ? ? ? break;

? ? ? ? ?case 5:

? ? ? ? ? money=A5.getMoney();

? ? ? ? ? goods=A5.getGoods();

? ? ? ? ? break;

? ? ? ? ?case 6:

? ? ? ? ? money=A6.getMoney();

? ? ? ? ? good=A6.getGoods();

? ? ? ? ? break;

? ? ? ? }

? ? ? ? moneys=moneys+money;

? ? ? ? persons=persons+person;

? ? ? ? goods=goods+good;

? ? ? ?}

? ? ? ?System.out.println("moneys="+moneys);

? ? ? ?System.out.println("persons="+persons);

? ? ? ?System.out.println("goods="+goods);

? ? ? ?System.out.println("請輸入租車天數(shù):");

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

? ? ? ?System.out.println("您的賬單:");

? ? ? ?System.out.println("所載人人數(shù)為:"+persons);

? ? ? ?System.out.println("所載貨物量為:"+goods);

? ? ? ?System.out.println("***租金總價(jià)格為:"+(moneys*days));

?

}

public static class car1{

private int num=1;//車子的序號

private String name="歐迪A4";//車子的名稱

private int money=500;//一天的租金

private int person=4;//一輛車子的載人數(shù)目

public int getNum(){

? ?return num;

}

public String getName(){

? ?return name;

}

public int getMoney(){

? ?return money;

}

public int getPerson(){

? ?return person;

}

public void input(){

? ?System.out.println(getNum()+" ?"+getName()+" "+getMoney()+"元/天"+""+"載人"+getPerson()+"人");

}

??

}

public static class car2{

? ?private int num=2;

? ?private String name="馬自達(dá)6";

? ?private int money=400;

? ?private int person=4;

? ?public int getNum(){

? ? return num;

? ?}

? ?public String getName(){

? ? return name;

? ?}

? ?public int getMoney(){

? ? return money;

? ?}

? ?public int getPerson(){

? ? return person;

? ?}

? ?public void input(){

? ? System.out.println(getNum()+" ?"+getName()+" "+getMoney()+"元/天"+""+"載人"+getPerson()+"人");

? ?}

? }

?public static class car3{

? ? private int num=3;

? ? private String name="皮卡雪6";

? ? private int money=450;

? ? private int person=4;

? ? private int good=2;

? ? public int getNum(){

? ? ?return num;

? ? }

? ? public String getName(){

? ? ?return name;

? ? }

? ? public int getMoney(){

? ? ?return money;

? ? }

? ? public int getPerson(){

? ? ?return person;

? ? }

? ? public int getGoods(){//皮卡雪6的載物量

? ? ?return good;

? ? }

? ? public void input(){

? ? ?System.out.println(getNum()+""+getName()+""+getMoney()+"元/天"+""+"載人"+getPerson()+"載物"+getGoods()+"噸");

? ? }

? ?}

?public static class car4{

? ? ?private int num=4;

? ? ?private String name="金龍";

? ? ?private int money=800;

? ? ?private int person=20;

? ? ?public int getNum(){

? ? ? return num;

? ? ?}

? ? ?public String getName(){

? ? ? return name;

? ? ?}

? ? ?public int ?getMoney(){

? ? ? return money;

? ? ?}

? ? ?public int getPerson(){

? ? ? return person;

? ? ?}

? ? ?public void input(){

? ? ? System.out.println(getNum()+""+getName()+""+getMoney()+"元/天"+""+"載人"+getPerson()+"人");

? ? ?}

? ? }

?public static class car5{

? ? ? private int num=5;

? ? ? private String name="松花江";

? ? ? private int money=400;

? ? ? private int good=4;

? ? ? public int getNum(){

? ? ? ?return num;

? ? ? }

? ? ? public String getName(){

? ? ? ?return name;

? ? ? }

? ? ? public int getMoney(){

? ? ? ?return money;

? ? ? }

? ? ? public int getGoods(){//松花江的載物量

? ? ? ?return good;

? ? ? }

? ? ? public void input(){

? ? ? ?System.out.println(getNum()+""+getName()+""+getMoney()+"元/天"+"載物"+getGoods()+"噸");

? ? ? }

? ? ?}

?public static class car6{

? ? ? ?private int num=6;

? ? ? ?private String name="依維柯";

? ? ? ?private int money=1000;

? ? ? ?private int good=20;

? ? ? ?public int getNum(){

? ? ? ? return num;

? ? ? ?}

? ? ? ?public String getName(){

? ? ? ? return name;

? ? ? ?}

? ? ? ?public int getMoney(){

? ? ? ? return money;

? ? ? ?}

? ? ? ?public int getGoods(){//依維柯的載物量

? ? ? ? return good;

? ? ? ?}

? ? ? ?public void input(){

? ? ? ? System.out.println(getNum()+" "+getMoney()+" "+"載物"+getGoods()+" "+"噸");

? ? ? ?}

? ? ?}



}


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

舉報(bào)

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

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

進(jìn)入課程

這個(gè)程序執(zhí)行不了,哪里出錯(cuò)了

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

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

幫助反饋 APP下載

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

公眾號

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