# oscarsantasanchez/24-25-idsw2-sdd architecture

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

- Interactive diagram: https://gitdiagram.com/oscarsantasanchez/24-25-idsw2-sdd
- Repository: https://github.com/oscarsantasanchez/24-25-idsw2-sdd

## Overview

##### Project Type and Components
- Project Type: A console-based spreadsheet application intended as a design exercise for a software engineering course.
- Core Components:
- A user interface (InterfazUsuario) to manage interactions with the user via a terminal.
- Input handling (Teclado) to capture user commands.
- The main spreadsheet functionality encapsulated in HojaCalculo.
- A matrix structure (Matriz) that organizes the spreadsheet grid.
- Individual cell representation (Celda) and its associated position (Posicion).
- Additional component abstraction (ComponenteHoja) to possibly support modular features.

##### Analyzing the File Structure and Documentation
- Top-level directories include:
- "src": Contains all core Java source files that implement the functionality.
- "documentos": Delivery documents that likely explain design iterations (structured as design, domain model, and object-oriented design).
- README Insights:
- The README emphasizes decomposition, modularity (agregación, composición), and clear design principles.

a. Main Components:
- User Interface Layer:
- InterfazUsuario: The entry point for user interactions.
- Teclado: Handles keyboard input and directs commands to the system.
- Business/Application Logic:
- HojaCalculo: Orchestrates operations between different modules.
- ComponenteHoja: Possibly a composite or service that extends HojaCalculo functionality.
- Data Model:
- Matriz: Represents the grid structure of the spreadsheet.
- Celda: Represents individual cells in the matrix.
- Posicion: Encapsulates the location or coordinates of each cell.
b. Relationships/Interactions:
- Data Flow: User commands enter via InterfazUsuario and Teclado, are processed by HojaCalculo, which then manipulates the Matriz. The Matriz, in turn, communicates with individual Celda instances (using Posicion to identify them).
- Composition/Aggregation: HojaCalculo is composed of or aggregates multiple components like Matriz and ComponenteHoja, indicating a modular design.
c. Architectural Patterns and Design Principles:
- Emphasis on separation of concerns (UI, processing, and data storage are clearly separated).
- Use of aggregation and composition to build a scalable system.
- Clear dependency direction: the UI calls the business logic, which then manages and updates the data model.
d. Technologies:
- The project is implemented in Java (as deduced from the .java files).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User Interface Layer"
        IU["InterfazUsuario"]:::ui
        T["Teclado"]:::ui
    end

    subgraph "Business Logic Layer"
        HC["HojaCalculo"]:::business
        CH["ComponenteHoja"]:::business
    end

    subgraph "Data Model Layer"
        M["Matriz"]:::data
        C["Celda"]:::data
        P["Posicion"]:::data
    end

    IU -->|"commands"| HC
    T -->|"commands"| HC
    HC -->|"manages"| M
    HC -->|"integrates"| CH
    M -->|"contains"| C
    C -->|"locatedAt"| P

    click IU "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/InterfazUsuario.java"
    click T "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/Teclado.java"
    click HC "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/HojaCalculo.java"
    click CH "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/ComponenteHoja.java"
    click M "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/Matriz.java"
    click C "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/Celda.java"
    click P "https://github.com/oscarsantasanchez/24-25-idsw2-sdd/blob/main/src/Posicion.java"

    classDef ui fill:#F9E79F,stroke:#D35400,stroke-width:2px;
    classDef business fill:#AED6F1,stroke:#2874A6,stroke-width:2px;
    classDef data fill:#D2B4DE,stroke:#884EA0,stroke-width:2px;
```
