The Notification Delivery System is a Java-based console application that demonstrates the implementation of the Factory Design Pattern using the Java Reflection API.
The application allows users to send notifications through different communication channels. Based on the notification mode selected by the user (EMAIL or SMS), the system dynamically creates the appropriate notification object using Class.forName() and sends the notification.
This project follows Object-Oriented Programming (OOP) principles and promotes loose coupling by separating object creation from business logic.
- Send notifications via Email
- Send notifications via SMS
- Dynamic object creation using Reflection API
- Factory Design Pattern implementation
- Interface-based programming
- Case-insensitive notification mode
- Exception handling for Reflection API
- Java
- Object-Oriented Programming (OOP)
- Factory Design Pattern
- Java Reflection API
- Exception Handling
Notification_Delivery_System/
│
├── src/
│ └── com/
│ └── nit/
│ └── prakhar/
│ ├── NotificationService.java
│ ├── EmailNotification.java
│ ├── SMSNotification.java
│ ├── NotificationFactory.java
│ ├── NotificationLogic.java
│ └── User.java
│
├── ScreenShots/
│
├── README.md
│
└── .gitignore
- The user enters a notification message.
- The user selects a notification mode (EMAIL or SMS).
- The
NotificationFactorydynamically creates the required notification object using Java Reflection (Class.forName()). - The
NotificationLogicinvokes thesendNotification()method. - The application displays the notification status.
The Factory Design Pattern centralizes object creation and hides implementation details from the client.
Instead of directly creating objects using:
new EmailNotification();the application dynamically creates objects using:
Class.forName("com.nit.prakhar.EmailNotification");This approach makes the application more flexible, maintainable, and easier to extend.
- Interface
- Abstraction
- Polymorphism
- Encapsulation
- Loose Coupling
- Dynamic Object Creation
Add your project output screenshot inside the ScreenShots folder.
- WhatsApp Notifications
- Push Notifications
- Telegram Notifications
- Slack Notifications
- File-based Notification Logs
- Database Integration
- Spring Boot REST API Integration
Through this project, I learned:
- Factory Design Pattern
- Java Reflection API
- Dynamic Class Loading
- Interface-Based Programming
- Object-Oriented Design Principles
- Exception Handling in Java
Prakhar Panchal
B.Tech CSE (AI & ML)
Java | Spring Boot | Hibernate | SQL | Git | GitHub## 📸 Screenshots

