错误: 无法将类 employee中的构造器 employee应用到给定类型。这个怎么解决啊?
/*
需求:数据建模
描述程序员和项目经理
分析:
程序员:( programmer)
特点:
姓名
年龄
部门
薪水 "李华",22,"市场部",2000,6000
行为: "刘强",29,"市场部",5000,10000
编码
项目经理:(PM project manager)
特点:
姓名
年龄
部门
薪水
奖金
行为:
管理
*/
class employee
{
String name;
int age;
String department;
int wage;
void employee(String name,int age,String department,int wage)
{
this.name=name;
this.age=age;
this.department=department;
this.wage=wage;
}
}
class programer extends employee
{
programer(String name,int age,String department,int wage)
{
super(name,age,department,wage);
}
programer(){}
void program()
{
System.out.println("认真编程");
}
void show()
{
System.out.println("姓名"+name+",年龄"+age+",部门"+department+",薪水"+wage);
}
}
class PM extends employee
{
int bonus;
PM(String name,int age,String department,int wage,int bonus)
{
super(name,age,department,wage);
this.bonus=bonus;
}
PM(){}
void show()
{
System.out.println("姓名"+name+",年龄"+age+",部门"+department+",薪水"+wage+",奖金"+bonus);
}
void manage()
{
System.out.println("管理程序员");
}
}
class fuxieyingyong
{
public static void main(String[] args)
{
programer p=new programer("刘强",20,"市场部",3000);
PM m=new PM("李华",30,"市场部",5000,10000);
p.show();
p.program();
m.show();
m.manage();
}
}