-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainPension.java
More file actions
55 lines (28 loc) · 1.63 KB
/
MainPension.java
File metadata and controls
55 lines (28 loc) · 1.63 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
55
import jdk.internal.icu.text.UnicodeSet;
import java.util.HashSet;
import java.util.Set;
public class MainPension {
public static void main (String[] args) {
PensionFund statePensionFund = new PensionFund("Goverment", true, "23-09-1983");
PensionFund notStatePensionFund = new PensionFund(" New-York lions bank", false, "23-09-2009");
double statPensionFund = statePensionFund.calculatePension(40, 2500.0, 2500.0);
double notStatPensionFund = notStatePensionFund.calculatePension(40, 2500.0, 2500.0);
System.out.println(statePensionFund.hashCode());
System.out.println(notStatePensionFund.hashCode());
Worker worker = new Worker();
worker.setMinSalary(1000);
worker.setMaxSalary (2000);
worker.setAge(45);
Set<PensionFund> HashSet = new HashSet<>();
String date1 = null;
PensionFund pensionFund = new PensionFund("Пенсионный фонд Берлина" ,TypeOfFond.STATE, "09- 08-74", date1);
UnicodeSet set = null;
set.add((CharSequence) pensionFund);
PensionFund pensionFundsecond = new PensionFund("Пенсионный фонд Петьки" ,TypeOfFond.SCAM, "08-08-88", date1);
set.add((CharSequence) pensionFundsecond);
PensionFund pensionFundThird = new PensionFund("Пенсионный фонд Берлина" ,TypeOfFond.NOT_STATE, "10-08-20", date1);
set.add((CharSequence) pensionFund);
worker.getAvailablePensionFunds(set);
System.out.println(worker.requestFundToCalcculatePension());
}
}