MCPcopy Create free account
hub / github.com/Anchals24/Low-Level-Design / PayToFriend

Class PayToFriend

TemplateDesignPattern/PayToFriend.java:3–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1package BehaviouralDesignPatterns.TemplateDesignPattern;
2
3public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected