This project simulates a defense system that manages and monitors various defense units, such as Helicopters, Tanks, and Submarines. The system features graphical user interfaces (GUIs) for each defense unit and leverages a centralized controller for communication and coordination.
- Defense Units: Simulate Helicopters, Tanks, and Submarines with unique characteristics.
- Centralized Control: MainController acts as a mediator for coordination and communication.
- Observer Pattern: Real-time updates on defense units' statuses and interactions.
- GUI Visualization: User-friendly interfaces to control and monitor each defense unit.
- Scalability: Easily extendable to add more defense units or functionalities.
- Characteristics: Aerial capabilities with mobility and firepower.
- User Actions: Shoot, missile operations, and laser operations.
- Integration: Communicates with the MainController about area messages, war strength, and updates.
- Characteristics: Ground-based operations with heavy firepower and durability.
- User Actions: Shoot and other tank-specific operations.
- Integration: Reports area messages and war strength to the MainController.
- Characteristics: Specialized for underwater missions with sonar and missile capabilities.
- User Actions: Underwater shooting, missile deployment, and sonar operations.
- Integration: Sends area updates and strength signals to the MainController.
- Role: Central coordinator managing interactions and broadcasting updates.
- Features: Strength calculation, global operations handling, and area message exchanges.
- Represents different strength levels (LOW, MEDIUM, HIGH, STRONG, CLOSED).
- Initializes the observer and MainController.
- Creates instances of Helicopter, Tank, and Submarine and links them to the observer.
- Programming Language: Java
- IDE: NetBeans (Recommended for opening and running the project)
- Design Patterns: Observer Pattern
- Libraries/Frameworks: Java Swing for GUI
- Clone the Repository:
git clone https://github.com/Tharush2002/DefenseSystem.git
- Open in NetBeans:
- Open NetBeans IDE.
- Navigate to
File -> Open Projectand select the cloned repository.
- Build and Run:
- Clean and build the project.
- Run the application to simulate the defense system.
- Interact with Defense Units:
- Use the GUI to control Helicopters, Tanks, and Submarines.
- Perform actions like shooting, sending messages, or updating attributes.
- Monitor Centralized Updates:
- Observe real-time updates via the MainController.
This project demonstrates centralized control in defense systems and can be extended to real-world scenarios requiring coordination among various units.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
feature/your-feature-name). - Commit your changes.
- Submit a pull request.
For any issues or queries, feel free to raise an issue or contact me.