|
@@ -7,14 +7,18 @@ public class Employee implements Worker, Transactable {
|
7
|
7
|
|
8
|
8
|
private BankAccount bankAccount;
|
9
|
9
|
private Double hoursWorked;
|
10
|
|
- private Double moneyEarned;
|
|
10
|
+ private Double hourlyWage;
|
11
|
11
|
|
12
|
12
|
public Employee() {
|
13
|
13
|
this.bankAccount = new BankAccount();
|
|
14
|
+ this.hoursWorked = 0.0;
|
|
15
|
+ this.hourlyWage = 35.0;
|
14
|
16
|
}
|
15
|
17
|
|
16
|
18
|
public Employee(BankAccount bankAccount) {
|
17
|
19
|
this.bankAccount = bankAccount;
|
|
20
|
+ this.hoursWorked = 0.0;
|
|
21
|
+ this.hourlyWage = 35.0;
|
18
|
22
|
}
|
19
|
23
|
|
20
|
24
|
public BankAccount getBankAccount() {
|
|
@@ -37,12 +41,12 @@ public class Employee implements Worker, Transactable {
|
37
|
41
|
|
38
|
42
|
@Override
|
39
|
43
|
public Double getHourlyWage() {
|
40
|
|
- return this.moneyEarned / this.hoursWorked;
|
|
44
|
+ return this.hourlyWage;
|
41
|
45
|
}
|
42
|
46
|
|
43
|
47
|
@Override
|
44
|
48
|
public Double getMoneyEarned() {
|
45
|
|
- return this.moneyEarned;
|
|
49
|
+ return this.hoursWorked * this.hourlyWage;
|
46
|
50
|
}
|
47
|
51
|
|
48
|
52
|
@Override
|