All class are supported with default constructor, proper constructor, set, get and toString method.
1. create a class “Employee” having id ,name ,gender, and job.
2. create a subclass “Worker” having hours worked, wages per hour. Write getSalary method to salary.
3. create a subclass “SalesMan” having sales and commission percent . Write getCommission method to  calculate salary.
4. create a client class “Roll” to have any employee by identifying using menu to print salary details(详细资料). 
    Input can be random(任意的, 随便的 ), but collect Worker and SalesMan details separately.

解决方案 »

  1.   

    只要意思:1. 建立一个class “Employee” 包括 id , name ,gender,job,
    2. 建立一个class “Worker” 包括 hours (工作时间), wages(每小时工资)
    3. 建立一个class “ SalesMan”  包括 sales(销售额),commission percent(佣金百分率)
    4. 建立一个class “ Roll”  连接以上class , 然后能输出详细信息