Add all 23 GoF design pattern implementations
This commit is contained in:
13
01-creational/factory-method/PushNotification.java
Normal file
13
01-creational/factory-method/PushNotification.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package factorymethod;
|
||||
|
||||
public class PushNotification implements Notification {
|
||||
|
||||
@Override
|
||||
public void send(String recipient, String message) {
|
||||
// In production: use Firebase FCM
|
||||
System.out.printf(" [PUSH] To: %s | Alert: %s%n", recipient, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() { return "PUSH"; }
|
||||
}
|
||||
Reference in New Issue
Block a user