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

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

No suggestions available,用抽象的方法做,矩形和圓的周長(zhǎng),面積

package abstracttest;
public class ShapeTest {
?shape s1 = new Rectangle();
?s1.zc();
?s1.mj();
?shape s2 = new Circle();
?s2.zc();
?s2.mj();

}

package abstracttest;

public abstract class shape {
?
?public abstract void zc();
?public abstract void mj();

}

package abstracttest;
public class Rectangle extends shape {
?int weight = 3;
?? int hight = 4;
?@Override
?public void zc() {
??// TODO Auto-generated method stub
?? int jxzc = 2*(weight+hight);
?? System.out.println("輸出矩形的周長(zhǎng)"+jxzc);
?}
?@Override
?public void mj() {
??// TODO Auto-generated method stub
??int jxmj = (weight * hight)/2;
??System.out.println("輸出矩形的面積"+jxmj);

?}

}

package abstracttest;

public class Circle extends shape {
int r=3;
?@Override
?public void zc() {
??// TODO Auto-generated method stub
??
??double rzc = 2*3.14*r;
??System.out.println("輸出圓的周長(zhǎng)"+rzc);
?}

?@Override
?public void mj() {
??// TODO Auto-generated method stub
??double rmj = 3.14*r*r;
??System.out.println("輸出圓的面積"+rmj);
????

?}

}

正在回答

1 回答

沒(méi)有出現(xiàn)這種提示呀,是不是編譯器設(shè)置不對(duì)呢

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

舉報(bào)

0/150
提交
取消

No suggestions available,用抽象的方法做,矩形和圓的周長(zhǎng),面積

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

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

幫助反饋 APP下載

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

公眾號(hào)

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