# rasha-khalid/python_assignment architecture

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

- Interactive diagram: https://gitdiagram.com/rasha-khalid/python_assignment
- Repository: https://github.com/rasha-khalid/python_assignment

## Overview

This repository contains two independent command-line employee-management implementations and a separate number-guessing game. The primary employee workflow is menu selection in `employees.py`, which dispatches to functions in `EmpFunctions.py` to validate input, operate on in-memory employee records, and display lists, search results, or summaries. `employees_sysmanagement.py` implements a second standalone employee manager with its own in-memory state and CRUD, search, and sorting. The README is empty; these relationships are based on the supplied source excerpts.

Main entry points: [`EmpFunctions.py`](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py) (Employee operations), [`employees_sysmanagement.py`](https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py) (Management menu), [`employees.py`](https://github.com/rasha-khalid/python_assignment/blob/main/employees.py) (Employee menu), [`first_assignment.py`](https://github.com/rasha-khalid/python_assignment/blob/main/first_assignment.py) (Guessing game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_employee_functions["Employee functions app"]
  node_employee_menu["Employee menu<br/>[employees.py]"]
  node_employee_ops["Employee operations<br/>[EmpFunctions.py]"]
  node_employee_records[("Employee records<br/>[EmpFunctions.py]")]
  node_input_validation["Input validation<br/>[EmpFunctions.py]"]
  node_employee_listing["List and search<br/>[EmpFunctions.py]"]
  node_employee_maintenance["Add, update, delete<br/>[EmpFunctions.py]"]
  node_employee_analytics["Department and tenure<br/>[EmpFunctions.py]"]
end

subgraph group_employee_class["Employee class app"]
  node_class_cli["Management menu"]
  node_employee_class["Employee model"]
  node_class_records[("Employee records")]
  node_class_search_sort["Search and sort"]
  node_class_crud["Employee CRUD"]
end

subgraph group_guessing_game["Guessing game"]
  node_game_entry["Guessing game"]
end

node_user(("User"))
node_random_source(("Random number source"))

node_user -->|"chooses actions"| node_employee_menu
node_employee_menu -->|"dispatches menu choices"| node_employee_ops
node_employee_ops -->|"requests validated input"| node_input_validation
node_employee_ops -->|"dispatches CRUD"| node_employee_maintenance
node_employee_ops -->|"dispatches listing and search"| node_employee_listing
node_employee_ops -->|"dispatches summaries"| node_employee_analytics
node_input_validation -->|"checks identifiers"| node_employee_records
node_employee_maintenance -->|"adds, updates, deletes"| node_employee_records
node_employee_listing -->|"reads records"| node_employee_records
node_employee_analytics -->|"reads records"| node_employee_records
node_user -->|"chooses actions"| node_class_cli
node_class_cli -->|"dispatches CRUD"| node_class_crud
node_class_cli -->|"dispatches search and sort"| node_class_search_sort
node_class_cli -->|"calls employee operations"| node_employee_class
node_employee_class -->|"creates and tracks records"| node_class_records
node_class_crud -->|"updates and deletes"| node_class_records
node_class_search_sort -->|"reads and sorts records"| node_class_records
node_user -->|"guesses number"| node_game_entry
node_random_source -->|"provides random number"| node_game_entry

click node_employee_menu "https://github.com/rasha-khalid/python_assignment/blob/main/employees.py"
click node_employee_ops "https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py"
click node_employee_records "https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py"
click node_input_validation "https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py"
click node_employee_listing "https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py"
click node_employee_maintenance "https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py"
click node_employee_analytics "https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py"
click node_class_cli "https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py"
click node_employee_class "https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py"
click node_class_records "https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py"
click node_class_search_sort "https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py"
click node_class_crud "https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py"
click node_game_entry "https://github.com/rasha-khalid/python_assignment/blob/main/first_assignment.py"

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_employee_menu,node_employee_ops,node_employee_records,node_input_validation,node_employee_listing,node_employee_maintenance,node_employee_analytics,node_user toneBlue
class node_class_cli,node_employee_class,node_class_records,node_class_search_sort,node_class_crud toneAmber
class node_game_entry toneMint
class node_random_source toneIndigo
```

## Components

### Employee functions app

- [Employee menu](https://github.com/rasha-khalid/python_assignment/blob/main/employees.py): `employees.py`
- [Employee operations](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py): `EmpFunctions.py`
- [Employee records](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py): `EmpFunctions.py`
- [Input validation](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py): `EmpFunctions.py`
- [List and search](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py): `EmpFunctions.py`
- [Add, update, delete](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py): `EmpFunctions.py`
- [Department and tenure](https://github.com/rasha-khalid/python_assignment/blob/main/EmpFunctions.py): `EmpFunctions.py`

### Employee class app

- [Management menu](https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py): `employees_sysmanagement.py`
- [Employee model](https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py): `employees_sysmanagement.py`
- [Employee records](https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py): `employees_sysmanagement.py`
- [Search and sort](https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py): `employees_sysmanagement.py`
- [Employee CRUD](https://github.com/rasha-khalid/python_assignment/blob/main/employees_sysmanagement.py): `employees_sysmanagement.py`

### Guessing game

- [Guessing game](https://github.com/rasha-khalid/python_assignment/blob/main/first_assignment.py): `first_assignment.py`

### Other components

- **User**
- **Random number source**

## Connections

- User → Employee menu: chooses actions
- Employee menu → Employee operations: dispatches menu choices
- Employee operations → Input validation: requests validated input
- Employee operations → Add, update, delete: dispatches CRUD
- Employee operations → List and search: dispatches listing and search
- Employee operations → Department and tenure: dispatches summaries
- Input validation → Employee records: checks identifiers
- Add, update, delete → Employee records: adds, updates, deletes
- List and search → Employee records: reads records
- Department and tenure → Employee records: reads records
- User → Management menu: chooses actions
- Management menu → Employee CRUD: dispatches CRUD
- Management menu → Search and sort: dispatches search and sort
- Management menu → Employee model: calls employee operations
- Employee model → Employee records: creates and tracks records
- Employee CRUD → Employee records: updates and deletes
- Search and sort → Employee records: reads and sorts records
- User → Guessing game: guesses number
- Random number source → Guessing game: provides random number
