| 1 | package BehaviouralDesignPatterns.TemplateDesignPattern; |
| 2 | |
| 3 | public class PayToFriend extends PaymentFlow{ |
| 4 | @Override |
| 5 | public void validateRequest() { |
| 6 | System.out.println("Validating the request for to Payment to a friend."); |
| 7 | } |
| 8 | |
| 9 | @Override |
| 10 | public void debitMoney() { |
| 11 | System.out.println("Deducting the request for to Payment to a friend."); |
| 12 | |
| 13 | } |
| 14 | |
| 15 | @Override |
| 16 | public void calculateCharges() { |
| 17 | System.out.println("Calculating 0% charges for to Payment to a friend."); |
| 18 | |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | public void creditMoney() { |
| 23 | System.out.println("Paying the FULL AMOUNT to the friend."); |
| 24 | |
| 25 | } |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected