JAVA编写一个表示雇员得类
时间: 2023-05-13 07:06:14 浏览: 144
雇员管理系统源码.zip
好的,以下是一个简单的JAVA代码,表示雇员的类:
```
public class Employee {
private String name;
private int age;
private double salary;
public Employee(String name, int age, double salary) {
this.name = name;
this.age = age;
this.salary = salary;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
public double getSalary() {
return salary;
}
public void setName(String name) {
this.name = name;
}
public void setAge(int age) {
this.age = age;
}
public void setSalary(double salary) {
this.salary = salary;
}
}
```
阅读全文