-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathEmployee.java
More file actions
53 lines (45 loc) · 1.14 KB
/
Employee.java
File metadata and controls
53 lines (45 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.ironhack;
public class Employee {
private static int employeeCount = 0;
private String name;
private String email;
private int age;
protected int salary;
public Employee(String name, String email, int age, int salary){
this.name = name;
this.email = email;
this.age = age;
setSalary(salary);
employeeCount++;
}
public String getName(){
return this.name;
}
public void setName(String name){
this.name = name;
}
public String getEmail(){
return this.email;
}
public void setEmail(String email){
this.email = email;
}
public int getAge(){
return this.age;
}
public void setAge(int age){
this.age = age;
}
public int getSalary(){
return this.salary;
}
public void setSalary(int salary){
this.salary = salary;
}
public String getInfo(){
return "Name: " + this.name + " | Email: " + this.email + " | Age: " + this.age + " | Salary: " + this.salary + "\n";
}
public static int getEmployeeCount() {
return employeeCount;
}
}