package exercise.exercise04; /** * @author WanJl * @version 1.0 * @title Intern * @description * @create 2026/7/24 */ public class Intern extends Employee{ private double allowance; public Intern(int id, String name, double allowance) { super(id, name); this.allowance = allowance; } /** * 计算薪资 * 返回 allowance(固定津贴,无其他扣减) * @return */ @Override public double calculateSalary() { return allowance; } /** * 输出 "实习生 xxx 在学习新技能..."(xxx 为姓名) */ public void learnSkill(){ System.out.println("实习生 "+this.getName()+" 在学习新技能..."); } }