# hilal-nurr/grade-average-calculator architecture

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

- Interactive diagram: https://gitdiagram.com/hilal-nurr/grade-average-calculator
- Repository: https://github.com/hilal-nurr/grade-average-calculator

## Overview

Grade Average Calculator is a single-file C# console app for maintaining course records and calculating grades. The main workflow is menu-driven: users add courses, which are scored and stored, then display, remove, clear, or summarize those records. Separate GNO and GPA calculations accept grades and credits directly. The README documents these capabilities; the excerpts show record handling and statistics, but omit the menu dispatch details and much of the grading logic, so those links cite the README where appropriate.

Main entry points: [`Program.cs`](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs) (Main menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Console interaction"]
  node_menu["Main menu<br/>[Program.cs]"]
end

subgraph group_records["Course records"]
  node_course_record["Course record<br/>[Program.cs]"]
  node_course_management["Course management<br/>[Program.cs]"]
end

subgraph group_calculations["Grade calculations"]
  node_course_grading["Course grading<br/>[Program.cs]"]
  node_statistics["Statistics<br/>[Program.cs]"]
  node_gno["GNO calculation<br/>[Program.cs]"]
  node_gpa["GPA calculation<br/>[Program.cs]"]
end

node_user(("User"))

node_user -->|"selects options"| node_menu
node_menu -->|"offers management"| node_course_management
node_menu -->|"offers statistics"| node_statistics
node_menu -->|"starts calculation"| node_gno
node_menu -->|"starts calculation"| node_gpa
node_course_management -->|"grades new courses"| node_course_grading
node_course_management -->|"adds and removes"| node_course_record
node_statistics -->|"reads records"| node_course_record
node_gno -->|"reports result"| node_user
node_gpa -->|"reports result"| node_user

click node_menu "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs"
click node_course_record "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs"
click node_course_management "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs"
click node_course_grading "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs"
click node_statistics "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs"
click node_gno "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs"
click node_gpa "https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.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_menu,node_user toneBlue
class node_course_record,node_course_management toneAmber
class node_course_grading,node_statistics,node_gno,node_gpa toneMint
```

## Components

### Console interaction

- [Main menu](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`

### Course records

- [Course record](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`
- [Course management](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`

### Grade calculations

- [Course grading](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`
- [Statistics](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`
- [GNO calculation](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`
- [GPA calculation](https://github.com/hilal-nurr/grade-average-calculator/blob/main/Program.cs): `Program.cs`

### Other components

- **User**

## Connections

- User → Main menu: selects options (evidence: `README.md`)
- Main menu → Course management: offers management (evidence: `README.md`)
- Main menu → Statistics: offers statistics (evidence: `README.md`)
- Main menu → GNO calculation: starts calculation (evidence: `README.md`)
- Main menu → GPA calculation: starts calculation (evidence: `README.md`)
- Course management → Course grading: grades new courses (evidence: `Program.cs`)
- Course management → Course record: adds and removes (evidence: `Program.cs`)
- Statistics → Course record: reads records (evidence: `Program.cs`)
- GNO calculation → User: reports result (evidence: `README.md`)
- GPA calculation → User: reports result (evidence: `README.md`)
