# xioterepart/tp-injection-depandances architecture

> Architecture diagram of the GitHub repository xioterepart/tp-injection-depandances, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xioterepart/tp-injection-depandances
- Repository: https://github.com/xioterepart/tp-injection-depandances

## Overview

##### Project type and purpose
- Key requirements:
- An IDao interface with getData()
- An IMetier interface with calcul()
- Provide concrete implementations of each, using loose coupling
- Wire (inject) the DAO into the Metier to satisfy the dependency

##### File structure
- The provided file tree only lists README.md, which implies a very minimal project layout. We can infer the likely directories and files you’d create:
- src/main/java/.../IDao.java
- src/main/java/.../DaoImpl.java
- src/main/java/.../IMetier.java
- src/main/java/.../MetierImpl.java
- src/main/java/.../MainApp.java (or similar)
- Possibly a simple “Injector” or factory class

##### README for additional insights
- It lays out a sequence: interface → implementation → interface → implementation → injection.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Interfaces
    IDao((IDao)):::interface
    IMetier((IMetier)):::interface

    %% Concrete Implementations
    DaoImpl["DaoImpl"]:::concrete
    MetierImpl["MetierImpl"]:::concrete

    %% Wiring Component
    Injector{"Injector"}:::wiring

    %% Application Entry
    MainApp["MainApp"]:::app

    %% Relationships
    MainApp -->|"requests IMetier"| Injector
    Injector -->|"creates DaoImpl()"| DaoImpl
    Injector -->|"creates MetierImpl(IDao)"| MetierImpl
    Injector -.->|"injects DaoImpl into MetierImpl"| MetierImpl
    MetierImpl -->|"calls getData() on"| IDao
    MetierImpl -->|"implements calcul()"| IMetier
    MainApp -->|"invokes calcul() on"| IMetier

    %% Styles
    classDef interface fill:#D0E8FF,stroke:#000,stroke-width:1px
    classDef concrete fill:#DFF7DF,stroke:#000,stroke-width:1px
    classDef wiring fill:#FFE4B5,stroke:#000,stroke-width:1px,stroke-dasharray: 5 5
    classDef app fill:#F0F0F0,stroke:#000,stroke-width:1px
```
