# fundamentos-programacion-redes-datos/ae1-bim1-aa2025 architecture

> Architecture diagram of the GitHub repository fundamentos-programacion-redes-datos/ae1-bim1-aa2025, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fundamentos-programacion-redes-datos/ae1-bim1-aa2025
- Repository: https://github.com/fundamentos-programacion-redes-datos/ae1-bim1-aa2025

## Overview

##### Project Type and Purpose
- This is a small console‐based billing and sales analysis application.
- It captures multiple customer orders for suits, applies tiered discounts, stores per‐customer data in parallel arrays, and computes summary statistics (average sale, max/min sale).

##### High‐Level Components
a. User Interface (CLI)
- Prompts for customer name, number of suits, unit price
- Loop control: “continue entering customers?”
b. Input Processing Module
- Reads and validates user input
- Triggers the business logic
c. Business Logic Module
- Calculates subtotal = quantity × unit price
- Applies discount based on quantity (10%, 20%, 40%, 60%)
- Computes discount amount and final total
d. Data Storage Module
- Four parallel 1D arrays:
– Customer first names
– Customer last names
– Quantities purchased
– Unit prices
– Calculated totals
e. Reporting Module
- Iterates arrays to display each customer’s record (name, qty, price, discount, total)
- Computes and displays average sale, highest sale, lowest sale

##### Relationships and Data Flow
- After storing each record, loop back to CLI for the next customer.

##### Key Architectural Patterns
- Modular separation: input vs. calculation vs. storage vs. reporting
- Simple pipeline/data‐flow architecture
- Use of parallel arrays for in‐memory storage

## Diagram (Mermaid)

```mermaid
flowchart TD
    CLI["CLI Interface\n(prompts for customer data)"]:::io
    Input["Input Processor\n(validates input)"]:::process
    Logic["Business Logic\n(Discount tiers: 10%,20%,40%,60%)"]:::process
    Storage["Data Storage\n(names[], quantities[], prices[], totals[])"]:::storage
    Report["Reporting Engine\n(displays records\nand computes avg, max, min)"]:::process

    CLI --> Input
    Input --> Logic
    Logic --> Storage
    Storage -->|continue entering customers?| Input
    Storage -->|done entering| Report
    Report --> CLI

    classDef io fill:#e0f7fa,stroke:#006064,color:#006064
    classDef process fill:#eef1f8,stroke:#3f51b5,color:#3f51b5
    classDef storage fill:#fff8e1,stroke:#f9a825,color:#f9a825
```
