# srbalakkl/java-abstractclass architecture

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

- Interactive diagram: https://gitdiagram.com/srbalakkl/java-abstractclass
- Repository: https://github.com/srbalakkl/java-abstractclass

## Overview

This tiny Java example reads two integers, constructs a Square and a Circle, and prints each shape’s area. Shape supplies the abstract area contract and is the superclass of both concrete classes. The same file also declares an unused DuplicateShape abstraction; it is omitted because it does not participate in the runtime workflow.

Main entry points: [`src/Main.java`](https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java) (Main)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Console user"))
node_main["Main<br/>[Main.java]"]
node_shape["Shape<br/>[Main.java]"]
node_square["Square<br/>[Main.java]"]
node_circle["Circle<br/>[Main.java]"]
node_console(("Console output"))

node_user -->|"enters integers"| node_main
node_main -->|"constructs and calls"| node_square
node_main -->|"constructs and calls"| node_circle
node_square -->|"extends"| node_shape
node_circle -->|"extends"| node_shape
node_main -->|"prints areas"| node_console

click node_main "https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java"
click node_shape "https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java"
click node_square "https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java"
click node_circle "https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.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_user toneBlue
class node_main,node_shape,node_square,node_circle toneTeal
class node_console toneIndigo
```

## Components

### Other components

- **Console user**
- [Main](https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java): `src/Main.java`
- [Shape](https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java): `src/Main.java`
- [Square](https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java): `src/Main.java`
- [Circle](https://github.com/srbalakkl/java-abstractclass/blob/master/src/Main.java): `src/Main.java`
- **Console output**

## Connections

- Console user → Main: enters integers (evidence: `src/Main.java`)
- Main → Square: constructs and calls (evidence: `src/Main.java`)
- Main → Circle: constructs and calls (evidence: `src/Main.java`)
- Square → Shape: extends (evidence: `src/Main.java`)
- Circle → Shape: extends (evidence: `src/Main.java`)
- Main → Console output: prints areas (evidence: `src/Main.java`)
