# Repository Overview

Welcome to this repository. This appears to be a small Java desktop application focused on demonstrating classic sorting algorithms through a Swing-based interface. A user starts from a menu, picks an algorithm, enters space-separated integers, and sees the sorted result in a second window. The codebase looks intentionally educational, with an extra "Open Code" action that launches Notepad files for the selected algorithm.

## Overview

This project appears to be a self-contained sorting visualizer and calculator. The application is split into a menu window and a sorter window: one class chooses the algorithm, while the other handles input, dispatch, and output. The available algorithms include bubble sort, selection sort, quick sort, insertion sort, merge sort, and heap sort.

The repository does not appear to use a large framework or service layer. Instead, it relies on plain Java classes and Swing components to build the UI and run the algorithms in memory.

## Technology Stack

Detected technologies and APIs:

- Java
- Swing for desktop UI
- AWT event handling
- Standard Java collections and arrays, used indirectly through primitive array logic
- `ProcessBuilder` for launching Notepad on Windows

No well-known application framework was detected from the imports. This appears to be a lightweight desktop program built directly on the Java standard library.

## Architecture

The architecture is simple and UI-driven. `Frame` acts as the launcher, `Sortingss` acts as the primary window and controller, and three helper classes implement quick sort, merge sort, and heap sort.

```mermaid
flowchart TD
FrameClass["Frame"] --> SortingssClass["Sortingss"]
SortingssClass --> QuiksClass["quiks"]
SortingssClass --> MergClass["merg"]
SortingssClass --> HeapsClass["heaps"]
FrameClass --> MainMenu["Algorithm selection window"]
SortingssClass --> SortWindow["Input and output window"]
```

At a high level:

- `Frame` opens the algorithm selection menu.
- `Sortingss` receives the chosen algorithm and manages the main sorting UI.
- `quiks`, `merg`, and `heaps` provide reusable algorithm implementations.
- Bubble sort, selection sort, and insertion sort are implemented directly inside the submit handler in `Sortingss`.

## Module Guide

### `algo_Calc`

This appears to be the only top-level module in the repository. It contains the GUI entry point, the main sorter window, and the helper classes for algorithm implementations. The key classes are `Frame`, `Sortingss`, `quiks`, `merg`, and `heaps`.

`Frame` is the first screen a user sees. It builds the algorithm selection window and routes the user into the sorter view when a button is clicked. `Sortingss` holds the main form, parses the input string, runs the chosen sort, and displays the result. The helper classes `quiks`, `merg`, and `heaps` encapsulate quick sort, merge sort, and heap sort respectively.

A few code references are worth knowing early:

- [`Frame`](src/algo_Calc/Frame.java:9)
- [`Sortingss`](src/algo_Calc/Sortingss.java:162)
- [`quiks`](src/algo_Calc/Sortingss.java:17)
- [`merg`](src/algo_Calc/Sortingss.java:55)
- [`heaps`](src/algo_Calc/Sortingss.java:120)

## Getting Started

If you are new to this codebase, start with `Frame.java`. It shows the application entry point and the buttons that determine which algorithm gets selected. From there, read `Sortingss.java` to understand how the main window is built, how the input is parsed, and how the submit handler dispatches to each algorithm.

A good reading order is:

1. `src/algo_Calc/Frame.java` — understand the menu and app startup flow.
2. `src/algo_Calc/Sortingss.java` — read the UI controller, submit logic, and "Open Code" action.
3. The helper classes inside `Sortingss.java` — `quiks`, `merg`, and `heaps`.
4. The module-level documentation in `.codewiki/algo_Calc.md` for a fuller class-by-class summary.

For runtime behavior, the most important entry points are:

- `Frame.main(String[] args)`
- `Sortingss.main(String[] args)`

The main user flow is:

1. Launch `Frame`.
2. Choose an algorithm.
3. Enter integers separated by spaces.
4. Click Submit to see the sorted output.
5. Optionally use Open Code to view the related text file in Notepad.

If you are extending the project, the safest next step is to follow the submit handler in `Sortingss.initialize()` and then inspect the helper classes for the algorithm you want to change.
