# Repository Overview

Welcome to this repository. This codebase appears to be a compact Java application focused on sorting algorithms, with a simple GUI that lets a user choose an algorithm, enter numbers, and view the sorted result. The project seems intentionally educational: it pairs interactive behavior with algorithm examples, and it also provides a way to open companion code/text files for each sort. The implementation relies on standard Java and Swing APIs rather than a larger framework, so the structure should be approachable for someone reading it for the first time.

## Overview

This repository appears to implement a small sorting visualizer or teaching tool. The app presents an initial menu of sorting choices, then opens a working window where the user can type a space-separated list of integers, run the selected algorithm, and see the output. It also includes an “Open Code” action that likely opens a text file associated with the chosen algorithm, which suggests the project is meant to demonstrate both the behavior and the implementation of common sorting methods.

The codebase is centered around a single module, `algo_Calc`, which contains the UI flow and the sorting logic. The module is compact, and the overall design appears straightforward: one screen chooses the algorithm, another screen performs parsing, sorting, and display.

## Technology Stack

The detected technology stack is simple and mostly standard:

- **Language:** Java
- **UI toolkit:** Swing / AWT
- **Libraries:** Java standard library only, based on the available source references
- **Packaging style:** Plain Java classes in a single module/package

No well-known third-party frameworks were detected from import analysis.

## Architecture

At a high level, the repository appears to have one main module that handles both user interaction and algorithm execution. `Frame` acts as the entry point for choosing an algorithm, while `Sortingss` appears to be the main working window. The algorithm implementations for quick sort, merge sort, and heap sort live alongside the UI code in helper classes.

```mermaid
flowchart LR
Repo["Repository"] --> AlgoCalc["algo_Calc module"]
AlgoCalc --> Frame["Frame"]
AlgoCalc --> Sortingss["Sortingss"]
Sortingss --> quiks["quiks"]
Sortingss --> merg["merg"]
Sortingss --> heaps["heaps"]
```

The relationship is fairly direct:

- `Frame` provides the algorithm-selection menu.
- `Sortingss` provides the input, output, and dispatch logic.
- `quiks`, `merg`, and `heaps` provide reusable implementations for the corresponding algorithms.

## Module Guide

### `algo_Calc`

This appears to be the only top-level module in the repository. It contains the full application flow, from the first menu the user sees to the algorithm execution and output rendering. The module includes five classes in total, with `Frame` serving as the launcher and `Sortingss` serving as the main interactive screen. The helper classes `quiks`, `merg`, and `heaps` implement the non-inline sorting algorithms used by the UI.

The key classes are:

- **`Frame`** — the menu window that lets the user choose a sorting algorithm
- **`Sortingss`** — the main input-and-output window that performs parsing, dispatch, and display
- **`quiks`** — quick sort helper
- **`merg`** — merge sort helper
- **`heaps`** — heap sort helper

## Getting Started

If you are new to the repository, a good reading order is:

1. **Start with `src/algo_Calc/Frame.java`** to understand the entry point and how the algorithm menu is wired.
2. **Read `src/algo_Calc/Sortingss.java` next** to see how the selected algorithm is received, how user input is parsed, and how results are rendered.
3. **Review the helper classes in `Sortingss.java`** — `quiks`, `merg`, and `heaps` — to understand the algorithm implementations used by the UI.
4. **Look for the companion text files** referenced by the Open Code action if you want the explanatory material associated with each sort.

A few practical notes for first-time readers:

- The app appears to use **absolute-position Swing layouts**, so the UI code may look more procedural than modern GUI code.
- The sorting input seems to expect **space-separated integers**.
- The quickest way to understand the system is to trace the flow from `Frame` → `Sortingss.vis(...)` → the submit handler inside `Sortingss`.

## Architecture Notes

The application appears to be intentionally self-contained. There is no sign of a service layer, persistence layer, or external API integration. That makes the repository easy to navigate, but it also means UI concerns and algorithm logic are closely coupled in the same module.

From a maintenance perspective, the most important integration points are:

- the algorithm-selection buttons in `Frame`
- the algorithm dispatch logic inside `Sortingss`
- the helper sort classes used for quick, merge, and heap sort

## Reference

- [algo_Calc module documentation](.codewiki/algo_Calc.md)