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

Method sendMoney

TemplateDesignPattern/PaymentFlow.java:10–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}

Callers 1

mainMethod · 0.80

Calls 4

validateRequestMethod · 0.95
debitMoneyMethod · 0.95
calculateChargesMethod · 0.95
creditMoneyMethod · 0.95

Tested by

no test coverage detected