# sergiescriva/ejercicios_3ev architecture

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

- Interactive diagram: https://gitdiagram.com/sergiescriva/ejercicios_3ev
- Repository: https://github.com/sergiescriva/ejercicios_3ev

## Overview

##### Main Components
- A central “src” module that contains all the source code.
- Sub-modules/packages representing exercise domains:
– Competi: likely contains competitive coding examples (e.g. array challenges, problems).
– Iterable: exercises using iterable collections (e.g., classes like Alumno, Clase, Pila).
– List: examples that work with lists and queues, CSV file interactions, and random number generation.
– Map: exercises demonstrating the use of maps with examples such as ContadorPalabras, Empleado, Empresa.
– Comparadores: module dedicated to comparator logic and sorting with different attributes.
– Control_acceso: dealing with access control examples (with CSV-based user access).
– Enums: exercises using enumerations to model domain concepts like playing cards and game states.
– Practica: likely dedicated to practice exercises like printing pages.
– Retos: challenge exercises such as those involving resistance calculations and number problems.
- An external “Test” component, implicit in the use of TestNG within the code (especially for MATRICAD and VOCALS).
- Configuration and project setup elements (e.g., the NetBeans project files like .iml, .idea folder, .gitignore).

##### Relationships and Interactions
- Although each exercise module is largely independent, they share common Java frameworks and testing methodologies.
- The “MATRICAD”, “VOCALS”, and “EMPLEAT” exercises are designed to have thorough unit tests with multiple test cases (as described in the README). This illustrates the integration of application logic with a testing framework.
- Some exercises use common CSV files (e.g., ListaAlumnos.csv in “List” and “comparadores”) indicating potential shared data or similarity in test case setup.
- Flow in each exercise: input data (hardcoded or via CSV) → business logic (methods implementing the exercise requirements) → testing (with TestNG, using setup and teardown methods for structuring test cases).

##### Architectural Patterns and Design Principles
- Modularization: Each exercise or concept is separated into its corresponding package, keeping concerns isolated.
- Use of JavaDoc for inline documentation explaining design decisions (e.g., equivalence partitioning for test cases).
- Incorporation of unit testing as a core part of the development, using TestNG’s annotations (@BeforeClass, @Test, etc.) which is a best practice in TDD (Test-Driven Development).
- Exception handling is deliberately designed (e.g., through custom “MaException” usage) to manage error cases in business logic.
- The project is set-up so it can be easily managed in an IDE like NetBeans, which hints at a well-segregated structure between code and configuration.

##### Relevant Technologies and Frameworks
- Java (the core programming language).
- TestNG as the testing framework.
- NetBeans IDE (suggested by the README and project configuration files like Ejercicios_3Ev.iml and .idea folder).
- Basic CSV file handling for data input in some modules.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Subgraph for Source Code Modules
    subgraph "src"
        A1["Competi Exercises"]:::module
        A2["Iterable Exercises"]:::module
        A3["List Exercises"]:::module
        A4["Map Exercises"]:::module
        A5["Comparator (Comparadores) Exercises"]:::module
        A6["Access Control Examples"]:::module
        A7["Enum Exercises"]:::module
        A8["Practice Exercises"]:::module
        A9["Challenge (Retos) Exercises"]:::module
    end

    %% External Testing Component
    T["Testing (TestNG)"]:::testing

    %% CSV Data Source Node
    C["CSV Data Input"]:::data

    %% Configuration Subgraph
    subgraph "Configuration"
        Conf1[".idea"]:::config
        Conf2["Ejercicios_3Ev.iml"]:::config
        Conf3[".gitignore"]:::config
    end

    %% Data Flow from CSV to relevant Modules
    C -->|"data_flow"| A3
    C -->|"data_flow"| A5

    %% Testing relationships with each module
    A1 -->|"has_tests"| T
    A2 -->|"has_tests"| T
    A3 -->|"has_tests"| T
    A4 -->|"has_tests"| T
    A5 -->|"has_tests"| T
    A6 -->|"has_tests"| T
    A7 -->|"has_tests"| T
    A8 -->|"has_tests"| T
    A9 -->|"has_tests"| T

    %% Configuration influences the Source Code base
    Conf1 -.->|"setup"| A1
    Conf2 -.->|"setup"| A1
    Conf3 -.->|"setup"| A1

    %% Click Events for Modules and Configuration
    click A1 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/Competi"
    click A2 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/Iterable"
    click A3 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/List"
    click A4 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/Map"
    click A5 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/comparadores"
    click A6 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/control_acceso"
    click A7 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/enums"
    click A8 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/practica"
    click A9 "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src/retos"
    click T "https://github.com/sergiescriva/ejercicios_3ev/tree/master/src"
    click Conf1 "https://github.com/sergiescriva/ejercicios_3ev/blob/master/.idea"
    click Conf2 "https://github.com/sergiescriva/ejercicios_3ev/blob/master/Ejercicios_3Ev.iml"
    click Conf3 "https://github.com/sergiescriva/ejercicios_3ev/blob/master/.gitignore"

    %% Styles
    classDef module fill:#E0FFFF,stroke:#0000FF,stroke-width:2px;
    classDef testing fill:#FFD700,stroke:#DAA520,stroke-width:2px;
    classDef data fill:#FFB6C1,stroke:#C71585,stroke-width:2px;
    classDef config fill:#FFE4B5,stroke:#CD853F,stroke-width:2px;
```
