SHOW:
|
|
- or go back to the newest paste.
1 | - | public class LoggingEmployee extends Employee |
1 | + | public class LoggingPayDispatcher |
2 | { | |
3 | - | public LoggingEmployee(Employee e) |
3 | + | private Employee e; |
4 | public LoggingPayDispatcher(Employee e) | |
5 | - | employee = e; |
5 | + | |
6 | this.e = e; | |
7 | } | |
8 | ||
9 | public void pay() | |
10 | { | |
11 | logPayment(); | |
12 | employee.pay(); | |
13 | } | |
14 | ||
15 | private void logPayment() | |
16 | { | |
17 | ... | |
18 | } | |
19 | } |