{
super(name,id,pay);
this.bonus=bonus;
}
public void work()
{
System.out.println("manager work");
}
}
class General extends Employee
{
// public void General(String name,String id,double pay)
General(String name,String id,double pay)// 这里也用构造函数
{
super(name,id,pay);
}
public void work()
{
System.out.println("General work");
}
}
class AbstractTest
{
public static void main(String[] args)
{
General g = new General("zhangsan","9959gy",15895.89);
g.work();
}
}