?? building.java~10~
字號:
package securitysystem;//大樓類,對火警采取自已的行動:public class Building extends SecurityZone { public Building(String name) { super(name); } boolean handleNotification(int measurement, Sensor sensor) { return false; } void fireAlarm(SecurityZone zone,Sensor sensor) { if (zone instanceof Area) { // Turn on sprinklers in surrounding areas // Don't call super.fireAlarm because that will turn on the // sprinkler for the whole warehouse. System.out.println(this.name+"棟大樓發生火警"); if (getParent() != null) getParent().fireAlarm(zone,sensor); return; } // if super.fireAlarm(zone,sensor);}}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -