package com.study.template_method
class HummerH1Model :HummerModel(){overridefunstart(){println("悍马H1正在启动....")}overridefunstop(){println("悍马H1正在停止....")}overridefunalarm(){println("悍马H1发出警报....")}overridefunengineBoom(){println("悍马H1引擎发出轰鸣声....")}}
package com.study.template_method
class HummerH2Model :HummerModel(){overridefunstart(){println("悍马H2正在启动....")}overridefunstop(){println("悍马H2正在停止....")}overridefunalarm(){println("悍马H2发出警报....")}overridefunengineBoom(){println("悍马H2引擎发出轰鸣声....")}}