# shaik-asif0/codtech-task2 architecture

> Architecture diagram of the GitHub repository shaik-asif0/codtech-task2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shaik-asif0/codtech-task2
- Repository: https://github.com/shaik-asif0/codtech-task2

## Overview

##### Main Components
- User Interface (CLI): This is where the application interacts directly with the user. It collects input (student name, subjects, grades) and displays the results.
- Business Logic (Student Class): This core component contains methods to add grades, compute the average, derive letter grades, and calculate GPA.
- Control Flow (Main Function): Acts as the orchestrator by capturing user choices and triggering the appropriate methods on the Student object. In this basic design, it ties together the UI and the business logic.
- In-Memory Data Storage: Since the student’s grades are kept in a dictionary within the Student object, the data is maintained in memory throughout the application’s execution.

##### Relationships and Interactions
- The UI (CLI) receives inputs and directs them to the control flow (main function).
- The main function creates an instance of the Student class based on user input.
- The Student class methods (add_grade, calculate_average, etc.) process the data and return results that the UI then displays.

##### Architectural Patterns & Design Principles
- Separation of Concerns: Even though it’s in a single file, there is a conceptual separation between input/output (user interface via CLI) and business logic (Student class methods).
- Procedural Flow: The control flow is managed procedurally via the main function loop, directing flow between user actions and logic.
- Data Encapsulation: The Student class encapsulates all the data and related operations (grades, calculations).

##### Relevant Technologies, Frameworks, and Libraries
- Python is the sole technology here.
- Standard Input/Output for the CLI.
- No external libraries or frameworks are used, so the design is purely based on core Python functionalities.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User Interaction Layer"
        UI["User Interface (CLI)"]:::cli
    end

    subgraph "Control Layer"
        Main["Main Function (Control Flow)"]:::control
    end

    subgraph "Business Logic Layer"
        Student["Student Class (Business Logic)"]:::business
        InMem["In-Memory Data Storage"]:::data
    end

    UI -->|"user_input"| Main
    Main -->|"calls_methods"| Student
    Student -->|"processes_data"| Main
    Main -->|"displays_output"| UI
    Student -->|"encapsulates"| InMem

    click UI "https://github.com/shaik-asif0/codtech-task2/blob/main/codeTech Task2/gradetracker.py"
    click Main "https://github.com/shaik-asif0/codtech-task2/blob/main/codeTech Task2/gradetracker.py"
    click Student "https://github.com/shaik-asif0/codtech-task2/blob/main/codeTech Task2/gradetracker.py"
    click InMem "https://github.com/shaik-asif0/codtech-task2/blob/main/codeTech Task2/gradetracker.py"

    classDef cli fill:#add8e6,stroke:#000,stroke-width:1px;
    classDef control fill:#90ee90,stroke:#000,stroke-width:1px;
    classDef business fill:#ffa500,stroke:#000,stroke-width:1px;
    classDef data fill:#dda0dd,stroke:#000,stroke-width:1px;
```
