# tomas-dorado/examen_1 architecture

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

- Interactive diagram: https://gitdiagram.com/tomas-dorado/examen_1
- Repository: https://github.com/tomas-dorado/examen_1

## Overview

##### Main Components
- Punto Module (Punto.py): Represents the “Point” entity. Document key methods such as the constructor, cuadrante, vector, distancia, and the string representation.
- Rectangulo Module (Rectangulo.py): Represents the “Rectangle” entity. Include its constructor, methods for base, altura, area, and its custom string representation.
- Main Driver (main.py): Acts as the entry point that instantiates and uses the Punto and Rectangulo classes, demonstrating their functionalities.

##### Relationships and Interactions
- The main.py module depends on both the Punto and Rectangulo modules.
- The Rectangulo class uses two Punto objects (punto_inicial and punto_final) to define its geometry.
- Data flows from main.py where Punto instances are created and then passed to the Rectangulo class for geometric calculations.
- The methods of both classes (for instance, calculating distances, vectors, and determining the quadrant) are used to compute and output results.

##### Architectural Patterns and Principles
- Object-Oriented Design: Emphasize the encapsulation of behavior and data in the Punto and Rectangulo classes.
- Demonstration of basic class relationships: Show composition where a Rectangulo is composed of two Punto objects.

##### Relevant Technologies and Libraries
- Python is the primary programming language.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Domain Classes"
        POINT["Punto.py\n- Constructor\n- cuadrante\n- vector\n- distancia\n- __str__"]:::domain
        RECT["Rectangulo.py\n- Constructor\n- base\n- altura\n- area\n- __str__\n(Composed of 2 Punto objects)"]:::domain
    end

    DRIVER["main.py"]:::driver

    DRIVER -->|"uses"| POINT
    DRIVER -->|"uses"| RECT
    RECT -->|"composition"| POINT

    click POINT "https://github.com/tomas-dorado/examen_1/blob/main/Punto.py"
    click RECT "https://github.com/tomas-dorado/examen_1/blob/main/Rectangulo.py"
    click DRIVER "https://github.com/tomas-dorado/examen_1/blob/main/main.py"

    classDef domain fill:#C8E6C9,stroke:#2E7D32,stroke-width:2px;
    classDef driver fill:#BBDEFB,stroke:#1565C0,stroke-width:2px;
```
