Skip to content

Mengkhorn/solid-principle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOLID Coding Challenge

Scenario:

You are asked to build a simple Notification System for a bank. must The system support:

Email Notification

SMS Notification

Push Notification

Your task:

Follow SRP, OCP, LSP, ISP, DIP

System must be easy to extend (e.g., Telegram later)

Use good architecture

Use clean dependency injection

Folder Structure for This Example

com.company.project └── notification ├── NotificationService.java ├── NotificationStrategy.java ├── EmailNotification.java └── SmsNotification.java

Principle Applied? Why
SRP Each notifier only sends one type of message
OCP Add new notifier without changing existing code
LSP All notifiers can replace each other safely
ISP Small interface with only one method
DIP NotificationService depends on Notifier interface

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages