# florb11/parcial2veterinaria architecture

> Architecture diagram of the GitHub repository florb11/parcial2veterinaria, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/florb11/parcial2veterinaria
- Repository: https://github.com/florb11/parcial2veterinaria

## Overview

##### Main Components
- • Animal Hierarchy: Start with an abstract or base class Animal, with subclasses like Perro (dog), Gato (cat), and Conejo (rabbit). These subclasses can override or introduce specific “examinar…” methods such as examinarPatas() (for Perro) or examinarPlumas() (if birds existed) to simulate animal-specific examinations.
- • Veterinario and Veterinaria: The Veterinario class represents the veterinarian who carries out treatments, while the Veterinaria class acts as the clinic controller—managing patient intake, treatment scheduling, and possibly coordinating with multiple veterinarios.
- • Tratamiento and Historial: The Tratamiento class is responsible for capturing the treatment administered, and Historial records the history of treatments or appointments for each animal.
- • Turno: This component handles appointment or scheduling information.
- • Main: The Main class serves as the entry point for the application and ties together the instantiation and orchestration of these components.

##### Relationships and Interactions
- • The Veterinaria class likely acts as an aggregator, receiving Animal objects (which could be Perro, Gato, or Conejo) and assigning them to the appropriate Veterinario for treatment based on the animal’s attributes.
- • The Veterinario class will interact with Historial to log diagnoses and with Tratamiento to record treatments executed.

##### Architectural Patterns and Design Principles
- • Separation of Concerns: Separate the responsibilities such that treatment handling, appointment scheduling, and historical logging are modularized into their respective classes.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Application Layer"
        MAIN["Main"]:::entry
        VETCLINIC["Veterinaria"]:::controller
        TURNO["Turno"]:::scheduling
        MAIN -->|"initialize"| VETCLINIC
        VETCLINIC -->|"schedule"| TURNO
    end

    subgraph "Domain Model"
        ANIMAL["Animal (abstract)"]:::domain
        PERRO["Perro"]:::domain
        GATO["Gato"]:::domain
        CONEJO["Conejo"]:::domain
        VET["Veterinario"]:::domain
        TRATAMIENTO["Tratamiento"]:::domain
        HISTORIAL["Historial"]:::domain

        ANIMAL -->|"inherit"| PERRO
        ANIMAL -->|"inherit"| GATO
        ANIMAL -->|"inherit"| CONEJO

        VETCLINIC -->|"receive paciente"| ANIMAL
        ANIMAL -->|"invoke examinarX()"| VET
        VET -->|"record treatment"| TRATAMIENTO
        VET -->|"log diagnosis"| HISTORIAL
    end

    subgraph "Resources"
        IMG["img"]:::resources
        MAIN ---|"load assets"| IMG
    end

    %% Click Events
    click ANIMAL "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Animal.java"
    click PERRO "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Perro.java"
    click GATO "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Gato.java"
    click CONEJO "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Conejo.java"
    click VET "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Veterinario.java"
    click VETCLINIC "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Veterinaria.java"
    click TRATAMIENTO "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Tratamiento.java"
    click HISTORIAL "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Historial.java"
    click TURNO "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Turno.java"
    click MAIN "https://github.com/florb11/parcial2veterinaria/blob/main/Veterinaria Parcial 2/src/Main.java"
    click IMG "https://github.com/florb11/parcial2veterinaria/tree/main/Veterinaria Parcial 2/src/img"

    %% Styles
    classDef entry fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef controller fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef scheduling fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
    classDef domain fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef resources fill:#cce5ff,stroke:#b8daff,stroke-width:2px;
```
