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

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

源碼,沒(méi)有進(jìn)行輸入限制

public class Test1 {

public static void main(String[] args) {

TransForm[] tra = new TransForm[3];

tra[0] = new Plant("飛機(jī)","天空",300);

tra[1] = new Ship("船", "水上", 100);

tra[2] = new Bus("大巴", "路面", 30);

for(TransForm i : tra){

i.print();

}

}

}

/*

?* 飛機(jī),輪船,大巴,運(yùn)輸人的數(shù)量和方式不同

?*/

abstract class TransForm{

protected String name;

protected String ways;

protected int num;

public TransForm(){}

public TransForm (String name,String ways,int num) {

this.name = name;

this.num = num;

this.ways = ways;

}

public void print(){

System.out.println(this.name+"可以在"+this.ways+"運(yùn)輸"+this.num+"人");

}

}

class Plant extends TransForm{

public Plant (String name,String ways,int num) {

super(name,ways,num);

}

}


class Ship extends TransForm{

private String ways = "water";

public Ship(String name,String ways,int num) {

super(name,ways,num);

}

}

class Bus extends TransForm{

public Bus(String name,String ways,int num) {

super(name,ways,num);

}

}


正在回答

2 回答

main方法哪去了

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

噓___________別說(shuō)話(huà) 提問(wèn)者

類(lèi) Test下面
2018-08-03 回復(fù) 有任何疑惑可以回復(fù)我~

https://img1.sycdn.imooc.com//5b6426a00001bb3702130096.jpgtest下面

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

舉報(bào)

0/150
提交
取消

源碼,沒(méi)有進(jìn)行輸入限制

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

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

幫助反饋 APP下載

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

公眾號(hào)

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