返回首页

求一个用JAVA做的简单人事管理系统代码

301 2023-04-27 16:18 admin

求一个用JAVA做的简单人事管理系统代码

汗 这已经是项目了 不给钱没人做的

找学长拷份呗

自己做吧。。屡屡思路先。。SWING界面。 JDBC链接数据库。

使用Java语言编写程序,输出某公司员工的基本信息

public class Test0 {

public static void main(String[] args) {

Employee ZhangSan = new Employee(001, 张三, '男', 销空孝售部, 6000, 1000, 普通员工);

Employee LiSi = new Employee(002, 李四, '女', 人事部, 7000, 2000, 超级员工);

System.out.println(ZhangSan.toString()); //打印斗念稿张三信息

System.out.println(LiSi.toString()); //打印李四信息

}

}

class Employee{

private String id; //员工ID

private String name; //姓名

private char sex; //性别

private String department; //部门

private int basic_salary; //基本工资

private int extra_salary; //薪高歼金

private String classify; //类别

/**

* 构造方法

*/

public Employee(String id, String name, char sex, String department,

int basic_salary, int extra_salary, String classify) {

this.id = id;

this.name = name;

this.sex = sex;

this.department = department;

this.basic_salary = basic_salary;

this.extra_salary = extra_salary;

this.classify = classify;

}

public Employee(){

}

public String getId() {

return id;

}

public void setId(String id) {

this.id = id;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public char getSex() {

return sex;

}

public void setSex(char sex) {

this.sex = sex;

}

public String getDepartment() {

return department;

}

public void setDepartment(String department) {

this.department = department;

}

public int getBasic_salary() {

return basic_salary;

}

public void setBasic_salary(int basic_salary) {

this.basic_salary = basic_salary;

}

public int getExtra_salary() {

return extra_salary;

}

public void setExtra_salary(int extra_salary) {

this.extra_salary = extra_salary;

}

public String getClassify() {

return classify;

}

public void setClassify(String classify) {

this.classify = classify;

}

public String toString(){

String str =[员工ID:+id+|姓名:+name+|性别:+sex+

|部门:+department+|基本工资:++basic_salary+

|薪金:+extra_salary+|类别:+classify+];

return str;

}

}