# leezhiwei/randomcodesnippets architecture

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

- Interactive diagram: https://gitdiagram.com/leezhiwei/randomcodesnippets
- Repository: https://github.com/leezhiwei/randomcodesnippets

## Overview

RandomCodeSnippets is a collection of independent learning exercises and small projects, not a single application with one user-to-result workflow. Users run a chosen snippet; its behavior ranges from console calculations to small domain exercises and standalone projects. The graph groups representative capabilities from the tree and README, including C#/C++/Python/Rust work, a hospital exercise, a point-of-sale cart, and account/card examples. Edges are limited to relationships shown in excerpts or SOURCE INDEX references; many listed files were not sampled, so their internal flows are omitted.

Main entry points: [`cs/Week 12/Hospital.cs`](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Hospital.cs) (Hospital Exercise), [`cs/Week 12/PosApp.cs`](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/PosApp.cs) (Cart Console App), [`cs/Week 4/SavingsAccount.cs`](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%204/SavingsAccount.cs) (Savings Account), [`cs/Week 3/Program.cs`](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%203/Program.cs) (Student Listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_csharp["C&#35; Exercises"]
  node_studentapp["Student Listing<br/>[Program.cs]"]
  node_student["Student Model<br/>[Student.cs]"]
  node_csmenus["Console Menus<br/>[Menu.cs]"]
  node_fares["Fare Calculators"]
end

subgraph group_domains["C&#35; Domain Apps"]
  node_savingsapp["Account Menu<br/>[Bank_SubClass.cs]"]
  node_savings["Savings Account<br/>[SavingsAccount.cs]"]
  node_accountdemo["Withdrawal Demo<br/>[Program.cs]"]
  node_cashdemo["Cash Card Demo<br/>[Program.cs]"]
  node_membercard["Member Cash Card<br/>[MemberCashCard.cs]"]
  node_hospital["Hospital Exercise<br/>[Hospital.cs]"]
  node_doctor["Doctor Model<br/>[Doctor.cs]"]
  node_patient["Patient Model<br/>[Patient.cs]"]
  node_room["Room Model<br/>[Room.cs]"]
  node_pos["Cart Console App<br/>[PosApp.cs]"]
  node_product["Product Model<br/>[Product.cs]"]
  node_cartitem["Cart Item<br/>[CartItem.cs]"]
end

subgraph group_python["Python Projects"]
  node_pycalc["Python Calculators"]
  node_pyorders["Order Exercise<br/>[PlaceOrders.py]"]
  node_pygui["GUI Exercise"]
  node_scraper["Calendar Scraper"]
  node_sqlxlsx["SQL to XLSX<br/>[sqltopy.py]"]
  node_drive["Drive Uploader<br/>[driveupload.py]"]
  node_decode["Text Decoder"]
  node_game["Archr vs Zombi"]
end

subgraph group_native["Native Exercises"]
  node_carray["Array Exercise<br/>[arraytest.c]"]
  node_cppprime["Prime Exercise<br/>[prime.cpp]"]
  node_rustcalc["Rust Calculator<br/>[calc.rs]"]
end

node_user(("Snippet User"))

node_studentapp -->|"creates and displays"| node_student
node_savingsapp -->|"loads and operates"| node_savings
node_accountdemo -->|"withdraws from"| node_savings
node_cashdemo -->|"creates and exercises"| node_membercard
node_hospital -->|"creates and assigns"| node_doctor
node_hospital -->|"loads and assigns"| node_patient
node_hospital -->|"creates and looks up"| node_room
node_pos -->|"creates and lists"| node_product
node_pos -->|"adds and displays"| node_cartitem

click node_studentapp "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%203/Program.cs"
click node_student "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%203/Student.cs"
click node_savingsapp "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%206/Bank_SubClass.cs"
click node_savings "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%204/SavingsAccount.cs"
click node_accountdemo "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%204/Program.cs"
click node_cashdemo "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%206/Program.cs"
click node_membercard "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%206/MemberCashCard.cs"
click node_hospital "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Hospital.cs"
click node_doctor "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Doctor.cs"
click node_patient "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Patient.cs"
click node_room "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Room.cs"
click node_pos "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/PosApp.cs"
click node_product "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Product.cs"
click node_cartitem "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/CartItem.cs"
click node_csmenus "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%201/Menu.cs"
click node_fares "https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%202/DistanceBasedFares.cs"
click node_pycalc "https://github.com/leezhiwei/randomcodesnippets/blob/main/python/GRUCTF/mathcalc-grucalc.py"
click node_pyorders "https://github.com/leezhiwei/randomcodesnippets/blob/main/python/From%20School/Week13/PlaceOrders.py"
click node_pygui "https://github.com/leezhiwei/randomcodesnippets/blob/main/python/From%20School/Week14/Sampl_%20GUI_Application.py"
click node_scraper "https://github.com/leezhiwei/randomcodesnippets/blob/main/python/From%20School/Week14/Web_Scraping_NPAcadCalendar.py"
click node_sqlxlsx "https://github.com/leezhiwei/randomcodesnippets/blob/main/python/SQLToXLSX/sqltopy.py"
click node_drive "https://github.com/leezhiwei/randomcodesnippets/blob/main/miniproj/GDriveUploader/driveupload.py"
click node_decode "https://github.com/leezhiwei/randomcodesnippets/blob/main/miniproj/DecodeThisJunk/solution/DecodeThisJunkRev.py"
click node_game "https://github.com/leezhiwei/randomcodesnippets/blob/main/miniproj/ArchrVSZombi/Archr_VS_Zombi_WIP_V3.py"
click node_carray "https://github.com/leezhiwei/randomcodesnippets/blob/main/c/arraytest.c"
click node_cppprime "https://github.com/leezhiwei/randomcodesnippets/blob/main/cpp/prime.cpp"
click node_rustcalc "https://github.com/leezhiwei/randomcodesnippets/blob/main/rust/calc.rs"

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_studentapp,node_student,node_csmenus,node_fares,node_user toneBlue
class node_savingsapp,node_savings,node_accountdemo,node_cashdemo,node_membercard,node_hospital,node_doctor,node_patient,node_room,node_pos,node_product,node_cartitem toneAmber
class node_pycalc,node_pyorders,node_pygui,node_scraper,node_sqlxlsx,node_drive,node_decode,node_game toneMint
class node_carray,node_cppprime,node_rustcalc toneRose
```

## Components

### C# Exercises

- [Student Listing](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%203/Program.cs): `cs/Week 3/Program.cs`
- [Student Model](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%203/Student.cs): `cs/Week 3/Student.cs`
- [Console Menus](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%201/Menu.cs): `cs/Week 1/Menu.cs`
- [Fare Calculators](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%202/DistanceBasedFares.cs): `cs/Week 2/DistanceBasedFares.cs`

### C# Domain Apps

- [Account Menu](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%206/Bank_SubClass.cs): `cs/Week 6/Bank_SubClass.cs`
- [Savings Account](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%204/SavingsAccount.cs): `cs/Week 4/SavingsAccount.cs`
- [Withdrawal Demo](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%204/Program.cs): `cs/Week 4/Program.cs`
- [Cash Card Demo](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%206/Program.cs): `cs/Week 6/Program.cs`
- [Member Cash Card](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%206/MemberCashCard.cs): `cs/Week 6/MemberCashCard.cs`
- [Hospital Exercise](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Hospital.cs): `cs/Week 12/Hospital.cs`
- [Doctor Model](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Doctor.cs): `cs/Week 12/Doctor.cs`
- [Patient Model](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Patient.cs): `cs/Week 12/Patient.cs`
- [Room Model](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Room.cs): `cs/Week 12/Room.cs`
- [Cart Console App](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/PosApp.cs): `cs/Week 12/PosApp.cs`
- [Product Model](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/Product.cs): `cs/Week 12/Product.cs`
- [Cart Item](https://github.com/leezhiwei/randomcodesnippets/blob/main/cs/Week%2012/CartItem.cs): `cs/Week 12/CartItem.cs`

### Python Projects

- [Python Calculators](https://github.com/leezhiwei/randomcodesnippets/blob/main/python/GRUCTF/mathcalc-grucalc.py): `python/GRUCTF/mathcalc-grucalc.py`
- [Order Exercise](https://github.com/leezhiwei/randomcodesnippets/blob/main/python/From%20School/Week13/PlaceOrders.py): `python/From School/Week13/PlaceOrders.py`
- [GUI Exercise](https://github.com/leezhiwei/randomcodesnippets/blob/main/python/From%20School/Week14/Sampl_%20GUI_Application.py): `python/From School/Week14/Sampl_ GUI_Application.py`
- [Calendar Scraper](https://github.com/leezhiwei/randomcodesnippets/blob/main/python/From%20School/Week14/Web_Scraping_NPAcadCalendar.py): `python/From School/Week14/Web_Scraping_NPAcadCalendar.py`
- [SQL to XLSX](https://github.com/leezhiwei/randomcodesnippets/blob/main/python/SQLToXLSX/sqltopy.py): `python/SQLToXLSX/sqltopy.py`
- [Drive Uploader](https://github.com/leezhiwei/randomcodesnippets/blob/main/miniproj/GDriveUploader/driveupload.py): `miniproj/GDriveUploader/driveupload.py`
- [Text Decoder](https://github.com/leezhiwei/randomcodesnippets/blob/main/miniproj/DecodeThisJunk/solution/DecodeThisJunkRev.py): `miniproj/DecodeThisJunk/solution/DecodeThisJunkRev.py`
- [Archr vs Zombi](https://github.com/leezhiwei/randomcodesnippets/blob/main/miniproj/ArchrVSZombi/Archr_VS_Zombi_WIP_V3.py): `miniproj/ArchrVSZombi/Archr_VS_Zombi_WIP_V3.py`

### Native Exercises

- [Array Exercise](https://github.com/leezhiwei/randomcodesnippets/blob/main/c/arraytest.c): `c/arraytest.c`
- [Prime Exercise](https://github.com/leezhiwei/randomcodesnippets/blob/main/cpp/prime.cpp): `cpp/prime.cpp`
- [Rust Calculator](https://github.com/leezhiwei/randomcodesnippets/blob/main/rust/calc.rs): `rust/calc.rs`

### Other components

- **Snippet User**

## Connections

- Student Listing → Student Model: creates and displays (evidence: `cs/Week 3/Program.cs`)
- Account Menu → Savings Account: loads and operates (evidence: `cs/Week 6/Bank_SubClass.cs`)
- Withdrawal Demo → Savings Account: withdraws from (evidence: `cs/Week 4/Program.cs`)
- Cash Card Demo → Member Cash Card: creates and exercises (evidence: `cs/Week 6/Program.cs`)
- Hospital Exercise → Doctor Model: creates and assigns (evidence: `cs/Week 12/Hospital.cs`)
- Hospital Exercise → Patient Model: loads and assigns (evidence: `cs/Week 12/Hospital.cs`)
- Hospital Exercise → Room Model: creates and looks up (evidence: `cs/Week 12/Hospital.cs`)
- Cart Console App → Product Model: creates and lists (evidence: `cs/Week 12/PosApp.cs`)
- Cart Console App → Cart Item: adds and displays (evidence: `cs/Week 12/PosApp.cs`)
