# mariasbotelho/dad architecture

> Architecture diagram of the GitHub repository mariasbotelho/dad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mariasbotelho/dad
- Repository: https://github.com/mariasbotelho/dad

## Overview

This repository is a set of Java concurrency exercises. In each example, Main creates a Runnable task, wraps it in a Thread, and starts it; the Java thread runtime then executes the task’s run method, which prints the result. The tasks demonstrate timed work, arithmetic, guessing, text length, vector addition, and matrix addition. The tree also contains an apparently empty React Native directory and an ODT file, but no sampled source or README documents their behavior, so they are not mapped.

Main entry points: [`01-java-thread/Main.java`](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/Main.java) (Thread demo entry), [`01-java-thread/exercicio1/Main.java`](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio1/Main.java) (Arithmetic entry), [`01-java-thread/exercicio2/Main.java`](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio2/Main.java) (Guessing entry), [`01-java-thread/exercicio3/Main.java`](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio3/Main.java) (Text entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_java_exercises["Java thread exercises"]
  node_main_base["Thread demo entry<br/>[Main.java]"]
  node_task_base["Timed task<br/>[Tarefa.java]"]
  node_main_ex1["Arithmetic entry<br/>[Main.java]"]
  node_task_ex1["Arithmetic task<br/>[Tarefa.java]"]
  node_main_ex2["Guessing entry<br/>[Main.java]"]
  node_task_ex2["Guessing task<br/>[Tarefa.java]"]
  node_main_ex3["Text entry<br/>[Main.java]"]
  node_task_ex3["Text task<br/>[Tarefa.java]"]
  node_main_ex4["Vector entry<br/>[Main.java]"]
  node_task_ex4["Vector task<br/>[Tarefa.java]"]
  node_main_ex5["Matrix entry<br/>[Main.java]"]
  node_task_ex5["Matrix task<br/>[Tarefa.java]"]
end

node_user(("User"))
node_java_thread{{"Java thread runtime"}}

node_user -->|"runs example"| node_main_base
node_user -->|"runs example"| node_main_ex1
node_user -->|"runs example"| node_main_ex2
node_user -->|"runs example"| node_main_ex3
node_user -->|"runs example"| node_main_ex4
node_user -->|"runs example"| node_main_ex5
node_main_base -->|"creates task"| node_task_base
node_main_base -->|"starts thread"| node_java_thread
node_java_thread -->|"dispatches run"| node_task_base
node_main_ex1 -->|"creates task"| node_task_ex1
node_main_ex1 -->|"starts thread"| node_java_thread
node_java_thread -->|"dispatches run"| node_task_ex1
node_main_ex2 -->|"creates tasks"| node_task_ex2
node_main_ex2 -->|"starts threads"| node_java_thread
node_java_thread -->|"dispatches run"| node_task_ex2
node_main_ex3 -->|"creates task"| node_task_ex3
node_main_ex3 -->|"starts thread"| node_java_thread
node_java_thread -->|"dispatches run"| node_task_ex3
node_main_ex4 -->|"creates task"| node_task_ex4
node_main_ex4 -->|"starts thread"| node_java_thread
node_java_thread -->|"dispatches run"| node_task_ex4
node_main_ex5 -->|"creates task"| node_task_ex5
node_main_ex5 -->|"starts thread"| node_java_thread
node_java_thread -->|"dispatches run"| node_task_ex5

click node_main_base "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/Main.java"
click node_task_base "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/Tarefa.java"
click node_main_ex1 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio1/Main.java"
click node_task_ex1 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio1/Tarefa.java"
click node_main_ex2 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio2/Main.java"
click node_task_ex2 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio2/Tarefa.java"
click node_main_ex3 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio3/Main.java"
click node_task_ex3 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio3/Tarefa.java"
click node_main_ex4 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio4/Main.java"
click node_task_ex4 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio4/Tarefa.java"
click node_main_ex5 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio5/Main.java"
click node_task_ex5 "https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio5/Tarefa.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_base,node_task_base,node_main_ex1,node_task_ex1,node_main_ex2,node_task_ex2,node_main_ex3,node_task_ex3,node_main_ex4,node_task_ex4,node_main_ex5,node_task_ex5,node_user toneBlue
class node_java_thread toneIndigo
```

## Components

### Java thread exercises

- [Thread demo entry](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/Main.java): `01-java-thread/Main.java`
- [Timed task](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/Tarefa.java): `01-java-thread/Tarefa.java`
- [Arithmetic entry](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio1/Main.java): `01-java-thread/exercicio1/Main.java`
- [Arithmetic task](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio1/Tarefa.java): `01-java-thread/exercicio1/Tarefa.java`
- [Guessing entry](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio2/Main.java): `01-java-thread/exercicio2/Main.java`
- [Guessing task](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio2/Tarefa.java): `01-java-thread/exercicio2/Tarefa.java`
- [Text entry](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio3/Main.java): `01-java-thread/exercicio3/Main.java`
- [Text task](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio3/Tarefa.java): `01-java-thread/exercicio3/Tarefa.java`
- [Vector entry](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio4/Main.java): `01-java-thread/exercicio4/Main.java`
- [Vector task](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio4/Tarefa.java): `01-java-thread/exercicio4/Tarefa.java`
- [Matrix entry](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio5/Main.java): `01-java-thread/exercicio5/Main.java`
- [Matrix task](https://github.com/mariasbotelho/dad/blob/main/01-java-thread/exercicio5/Tarefa.java): `01-java-thread/exercicio5/Tarefa.java`

### Other components

- **User**
- **Java thread runtime**

## Connections

- User → Thread demo entry: runs example
- User → Arithmetic entry: runs example
- User → Guessing entry: runs example
- User → Text entry: runs example
- User → Vector entry: runs example
- User → Matrix entry: runs example
- Thread demo entry → Timed task: creates task
- Thread demo entry → Java thread runtime: starts thread
- Java thread runtime → Timed task: dispatches run
- Arithmetic entry → Arithmetic task: creates task
- Arithmetic entry → Java thread runtime: starts thread
- Java thread runtime → Arithmetic task: dispatches run
- Guessing entry → Guessing task: creates tasks
- Guessing entry → Java thread runtime: starts threads
- Java thread runtime → Guessing task: dispatches run
- Text entry → Text task: creates task
- Text entry → Java thread runtime: starts thread
- Java thread runtime → Text task: dispatches run
- Vector entry → Vector task: creates task
- Vector entry → Java thread runtime: starts thread
- Java thread runtime → Vector task: dispatches run
- Matrix entry → Matrix task: creates task
- Matrix entry → Java thread runtime: starts thread
- Java thread runtime → Matrix task: dispatches run
