# willxxx7/goodprogramdesign architecture

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

- Interactive diagram: https://gitdiagram.com/willxxx7/goodprogramdesign
- Repository: https://github.com/willxxx7/goodprogramdesign

## Overview

This is a small console multiplication quiz and teaching example. A player enters a name, answers ten generated questions, receives feedback, and sees a final score. The entry point wires a question source and report writer into the quiz runner; the runner owns quiz flow and answer validation. The source excerpt shows question construction and the console writer’s output responsibilities, but omits much of the runner’s loop, so some workflow links are documented rather than verified from calls.

Main entry points: [`MathsQuiz.cs`](https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs) (Quiz Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application Startup"]
  node_program["Program Entry<br/>[MathsQuiz.cs]"]
end

subgraph group_quiz["Quiz Domain"]
  node_quiz_runner["Quiz Runner<br/>[MathsQuiz.cs]"]
  node_question_source["Random Question Source<br/>[MathsQuiz.cs]"]
  node_question_models["Question and Results<br/>[MathsQuiz.cs]"]
end

subgraph group_interaction["Console Interaction"]
  node_report_writer["Console Report Writer<br/>[MathsQuiz.cs]"]
end

node_player(("Player"))
node_terminal["Console"]

node_player -->|"enters answers"| node_terminal
node_program -->|"starts"| node_quiz_runner
node_program -->|"constructs"| node_question_source
node_program -->|"constructs"| node_report_writer
node_quiz_runner -.->|"requests questions"| node_question_source
node_question_source -->|"creates questions"| node_question_models
node_quiz_runner -.->|"reports progress"| node_report_writer
node_report_writer -->|"writes output"| node_terminal
node_quiz_runner -.->|"reads name"| node_terminal

click node_program "https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs"
click node_quiz_runner "https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs"
click node_question_source "https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs"
click node_question_models "https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs"
click node_report_writer "https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs"

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_program toneBlue
class node_quiz_runner,node_question_source,node_question_models toneAmber
class node_report_writer toneMint
class node_player,node_terminal toneIndigo
```

## Components

### Application Startup

- [Program Entry](https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs): `MathsQuiz.cs`

### Quiz Domain

- [Quiz Runner](https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs): `MathsQuiz.cs`
- [Random Question Source](https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs): `MathsQuiz.cs`
- [Question and Results](https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs): `MathsQuiz.cs`

### Console Interaction

- [Console Report Writer](https://github.com/willxxx7/goodprogramdesign/blob/main/MathsQuiz.cs): `MathsQuiz.cs`

### Other components

- **Player**
- **Console**

## Connections

- Player → Console: enters answers (evidence: `ReadME.md`)
- Program Entry → Quiz Runner: starts (evidence: `MathsQuiz.cs`)
- Program Entry → Random Question Source: constructs (evidence: `MathsQuiz.cs`)
- Program Entry → Console Report Writer: constructs (evidence: `MathsQuiz.cs`)
- Quiz Runner → Random Question Source: requests questions (evidence: `MathsQuiz.cs`)
- Random Question Source → Question and Results: creates questions (evidence: `MathsQuiz.cs`)
- Quiz Runner → Console Report Writer: reports progress (evidence: `MathsQuiz.cs`)
- Console Report Writer → Console: writes output (evidence: `MathsQuiz.cs`)
- Quiz Runner → Console: reads name
