()
| 8 | public abstract void creditMoney(); |
| 9 | |
| 10 | public final void sendMoney(){ |
| 11 | //Template Method: Defines the order of steps to execute the task. |
| 12 | //Step-1: |
| 13 | System.out.println("Step-1:"); |
| 14 | validateRequest(); |
| 15 | //Step-2: |
| 16 | System.out.println("Step-2:"); |
| 17 | debitMoney(); |
| 18 | //Step-3: |
| 19 | System.out.println("Step-3:"); |
| 20 | calculateCharges(); |
| 21 | //Step-4: |
| 22 | System.out.println("Step-4:"); |
| 23 | creditMoney(); |
| 24 | |
| 25 | } |
| 26 | } |
no test coverage detected