class Employeeprivate String name;private int birthmonth;public Employee()public Employee(String name,int birthmonth)this.setName(name);this.setBirthmonth(birthmonth);public String getName() return name;public void setName。
3、(String name) this.name = name;public int getBirthmonth() return birthmonth;public void setBirthmonth(int birthmonth) this.birthmonth = birthmonth;public int getSalary(int month) if(month=this.getBirthmonth()return 100;else return 0;public void print()System.out.print(该员工信息:+姓名:+this.getName()+ 出生月份。
4、:+this.getBirthmonth()+月 工资:);class SalariedEmployee extends Employeeprivate int salary;/工资public SalariedEmployee(String name,int birthmonth,int salary)super(name,birthmonth);setSalary(salary);public int getSalary() return salary;public void setSalary(int salary) this.salary = salary;public int get。
5、Salary(int month) return this.salary+super.getSalary(month); class HourlyEmployee extends Employeeprivate int hour;/工作时间private int salary;/每小时工资public Hourl