Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📩 Notification Delivery System using Factory Design Pattern

📖 Overview

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.


✨ Features

  • 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

🛠 Technologies Used

  • Java
  • Object-Oriented Programming (OOP)
  • Factory Design Pattern
  • Java Reflection API
  • Exception Handling

📂 Project Structure

Notification_Delivery_System/
│
├── src/
│   └── com/
│       └── nit/
│           └── prakhar/
│               ├── NotificationService.java
│               ├── EmailNotification.java
│               ├── SMSNotification.java
│               ├── NotificationFactory.java
│               ├── NotificationLogic.java
│               └── User.java
│
├── ScreenShots/
│
├── README.md
│
└── .gitignore

🚀 How It Works

  1. The user enters a notification message.
  2. The user selects a notification mode (EMAIL or SMS).
  3. The NotificationFactory dynamically creates the required notification object using Java Reflection (Class.forName()).
  4. The NotificationLogic invokes the sendNotification() method.
  5. The application displays the notification status.

🏗 Design Pattern Used

Factory Design Pattern

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.


💡 OOP Concepts Demonstrated

  • Interface
  • Abstraction
  • Polymorphism
  • Encapsulation
  • Loose Coupling
  • Dynamic Object Creation

📸 Screenshot

Add your project output screenshot inside the ScreenShots folder.

![Notification Delivery System Output](ScreenShots/notification-delivery-system-output.png)

🔮 Future Enhancements

  • WhatsApp Notifications
  • Push Notifications
  • Telegram Notifications
  • Slack Notifications
  • File-based Notification Logs
  • Database Integration
  • Spring Boot REST API Integration

📚 Learning Outcomes

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

👨‍💻 Author

Prakhar Panchal

B.Tech CSE (AI & ML)

Java | Spring Boot | Hibernate | SQL | Git | GitHub## 📸 Screenshots

Email Notification Output

Email Notification Output

SMS Notification Output

SMS Notification Output

About

Java project demonstrating the Factory Design Pattern using Reflection API to dynamically send notifications via Email or SMS.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages