# sskeme/eeee346-f26-hw8 architecture

> Architecture diagram of the GitHub repository sskeme/eeee346-f26-hw8, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sskeme/eeee346-f26-hw8
- Repository: https://github.com/sskeme/eeee346-f26-hw8

## Overview

This small C++ homework program demonstrates dynamic binding for two shape types. The user selects a circle or rectangle and supplies its dimensions; `main.cpp` is intended to create the selected object through a `Shape` pointer and display it. `Shape` defines the abstract interface, while `Circle` and `Rectangle` provide the concrete measurements and display output. The excerpts contain TODOs in the main workflow and class definitions, so those intended connections are supported by the README rather than completed code.

Main entry points: [`main.cpp`](https://github.com/sskeme/eeee346-f26-hw8/blob/main/main.cpp) (Program entry), [`shape.h`](https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h) (Circle)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_main["Program entry<br/>[main.cpp]"]
node_shape["Shape interface<br/>[shape.h]"]
node_circle["Circle<br/>[shape.h]"]
node_rectangle["Rectangle<br/>[shape.h]"]

node_user -->|"selects dimensions"| node_main
node_main -->|"creates when selected"| node_circle
node_main -->|"creates otherwise"| node_rectangle
node_main -->|"uses pointer"| node_shape
node_main -->|"dispatches display"| node_circle
node_main -->|"dispatches display"| node_rectangle
node_circle -->|"inherits"| node_shape
node_rectangle -->|"inherits"| node_shape
node_circle -->|"display calls measurements"| node_circle
node_rectangle -->|"display calls measurements"| node_rectangle

click node_main "https://github.com/sskeme/eeee346-f26-hw8/blob/main/main.cpp"
click node_shape "https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h"
click node_circle "https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h"
click node_rectangle "https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h"

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_circle,node_rectangle toneTeal
```

## Components

### Other components

- **User**
- [Program entry](https://github.com/sskeme/eeee346-f26-hw8/blob/main/main.cpp): `main.cpp`
- [Shape interface](https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h): `shape.h`
- [Circle](https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h): `shape.h`
- [Rectangle](https://github.com/sskeme/eeee346-f26-hw8/blob/main/shape.h): `shape.h`

## Connections

- User → Program entry: selects dimensions (evidence: `README.md`)
- Program entry → Circle: creates when selected (evidence: `README.md`)
- Program entry → Rectangle: creates otherwise (evidence: `README.md`)
- Program entry → Shape interface: uses pointer (evidence: `README.md`)
- Program entry → Circle: dispatches display (evidence: `README.md`)
- Program entry → Rectangle: dispatches display (evidence: `README.md`)
- Circle → Shape interface: inherits (evidence: `shape.h`)
- Rectangle → Shape interface: inherits (evidence: `shape.h`)
- Circle → Circle: display calls measurements (evidence: `shape.h`)
- Rectangle → Rectangle: display calls measurements (evidence: `shape.h`)
