阿摩線上測驗 登入

申論題資訊

試卷:98年 - 98 地方政府特種考試_三等_資訊處理:程式語言#28786
科目:程式語言
年份:98年
排序:0

題組內容

三、物件導向程式語言
Java 使用關鍵字 extends 來表達繼承觀念:
public class Animal {
public String moveMethod() {
return "Unspecified";
}
}
public class Bird extends Animal {
public String moveMethod() {
return "fly";
}
}
public class Dog extends Animal {
public String moveMethod() {
return "run";
}
}
public class Fish extends Animal {
public String moveMethod() {
return "swim";
}
}

申論題內容

⑴繪出物件類別繼承圖。(7 分)