abstract class elehousekeeping { //抽象家用电器类
abstract void opermode(); //抽象方法
}
class TV extends elehousekeeping { //电视机
public void opermode() {
System.out.println("13:12 TV is working.");
}
}
class aircondition extends elehousekeeping { //空调
public void opermode() {
System.out.println("15:23 aircondition is working.");
}
}
class microven extends elehousekeeping { //微波炉
public void opermode() {
System.out.println("19:57 microven is working.");
}
}
public class Main3 {
public static void main(String[] args) {
TV T=new TV();
aircondition a =new aircondition();
microven m=new microven();
T.opermode();
a.opermode();
m.opermode();
}
}