# mounesh-13/studentgradesystem architecture

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

- Interactive diagram: https://gitdiagram.com/mounesh-13/studentgradesystem
- Repository: https://github.com/mounesh-13/studentgradesystem

## Overview

This is a self-contained Java teaching demo, not a persistent student-record service: its entry point creates hardcoded undergraduate and postgraduate students, prints their averages and grades, then demonstrates validation failures, runtime exceptions, and String behavior. Student owns mark validation and average calculation; subclass implementations supply the grade rules. The README documents OOP and exception-handling goals, while the excerpts show the concrete flow. There are no databases, external libraries, or user-input stage.

Main entry points: [`src/Student.java`](https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java) (Student model), [`src/StudentGradeDemo.java`](https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java) (Demo entry point), [`src/StudentNotFoundException.java`](https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentNotFoundException.java) (Student not found exception), [`src/InvalidMarksException.java`](https://github.com/mounesh-13/studentgradesystem/blob/main/src/InvalidMarksException.java) (Invalid marks exception)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Demo flow"]
  node_runner["Demo entry point"]
  node_exception_demos["Exception scenarios"]
  node_not_found["Student not found exception"]
end

subgraph group_student["Student domain"]
  node_student_base["Student model<br/>[Student.java]"]
  node_undergrad["Undergraduate rules<br/>[Student.java]"]
  node_postgrad["Postgraduate rules<br/>[Student.java]"]
  node_invalid_marks["Invalid marks exception"]
end

subgraph group_concepts["Language examples"]
  node_string_demo["String examples"]
end

node_console(("Console user"))

node_runner -->|"creates and queries"| node_student_base
node_student_base -->|"base class"| node_undergrad
node_student_base -->|"base class"| node_postgrad
node_student_base -->|"throws on invalid marks"| node_invalid_marks
node_runner -->|"runs"| node_exception_demos
node_exception_demos -->|"tests mark validation"| node_student_base
node_exception_demos -->|"throws and catches"| node_not_found
node_runner -->|"demonstrates"| node_string_demo
node_runner -->|"prints results"| node_console
node_exception_demos -->|"prints outcomes"| node_console

click node_runner "https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java"
click node_exception_demos "https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java"
click node_string_demo "https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java"
click node_student_base "https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java"
click node_undergrad "https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java"
click node_postgrad "https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java"
click node_invalid_marks "https://github.com/mounesh-13/studentgradesystem/blob/main/src/InvalidMarksException.java"
click node_not_found "https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentNotFoundException.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_runner,node_exception_demos,node_not_found,node_console toneBlue
class node_student_base,node_undergrad,node_postgrad,node_invalid_marks toneAmber
class node_string_demo toneMint
```

## Components

### Demo flow

- [Demo entry point](https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java): `src/StudentGradeDemo.java`
- [Exception scenarios](https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java): `src/StudentGradeDemo.java`
- [Student not found exception](https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentNotFoundException.java): `src/StudentNotFoundException.java`

### Student domain

- [Student model](https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java): `src/Student.java`
- [Undergraduate rules](https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java): `src/Student.java`
- [Postgraduate rules](https://github.com/mounesh-13/studentgradesystem/blob/main/src/Student.java): `src/Student.java`
- [Invalid marks exception](https://github.com/mounesh-13/studentgradesystem/blob/main/src/InvalidMarksException.java): `src/InvalidMarksException.java`

### Language examples

- [String examples](https://github.com/mounesh-13/studentgradesystem/blob/main/src/StudentGradeDemo.java): `src/StudentGradeDemo.java`

### Other components

- **Console user**

## Connections

- Demo entry point → Student model: creates and queries (evidence: `src/StudentGradeDemo.java`)
- Student model → Undergraduate rules: base class (evidence: `src/Student.java`)
- Student model → Postgraduate rules: base class (evidence: `src/Student.java`)
- Student model → Invalid marks exception: throws on invalid marks (evidence: `src/Student.java`)
- Demo entry point → Exception scenarios: runs (evidence: `src/StudentGradeDemo.java`)
- Exception scenarios → Student model: tests mark validation (evidence: `src/StudentGradeDemo.java`)
- Exception scenarios → Student not found exception: throws and catches (evidence: `src/StudentGradeDemo.java`)
- Demo entry point → String examples: demonstrates (evidence: `src/StudentGradeDemo.java`)
- Demo entry point → Console user: prints results (evidence: `src/StudentGradeDemo.java`)
- Exception scenarios → Console user: prints outcomes (evidence: `src/StudentGradeDemo.java`)
