-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeveloper.java
More file actions
54 lines (40 loc) · 1.1 KB
/
Developer.java
File metadata and controls
54 lines (40 loc) · 1.1 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
54
package dataclasses;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
public class Developer {
private BigDecimal salary = BigDecimal.ZERO;
private String name = "";
private int age = 0;
public BigDecimal getSalary() {
return salary;
}
public void setSalary(BigDecimal salary) {
this.salary = salary;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Developer(BigDecimal salary, String name, int age) {
this.salary = salary;
this.name = name;
this.age = age;
}
public static List<Developer> getDevelopers(){
List<Developer> result = new ArrayList<>();
result.add(new Developer(new BigDecimal("10000"), "Mehmet", 33));
result.add(new Developer(new BigDecimal("12000"), "Ali", 20));
result.add(new Developer(new BigDecimal("5000"), "Mahmut", 12));
result.add(new Developer(new BigDecimal("7500"), "Veli", 50));
return result;
}
}