# ly-rick/cpp_practice architecture

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

- Interactive diagram: https://gitdiagram.com/ly-rick/cpp_practice
- Repository: https://github.com/ly-rick/cpp_practice

## Overview

This repository is a set of independent introductory C++ console programs, not one integrated application. Each executable demonstrates a small task: arithmetic, month selection, age or salary checks, counting, or socket creation. Users run a program and interact with it through the console where applicable. The excerpts show no calls between the examples; `istad.cpp` creates and closes a local socket but does not connect to a remote service.

Main entry points: [`istad.cpp`](https://github.com/ly-rick/cpp_practice/blob/master/istad.cpp) (Socket demo), [`main.cpp`](https://github.com/ly-rick/cpp_practice/blob/master/main.cpp) (Arithmetic demo), [`chai.cpp`](https://github.com/ly-rick/cpp_practice/blob/master/chai.cpp) (Month selector), [`math.cpp`](https://github.com/ly-rick/cpp_practice/blob/master/math.cpp) (Age checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_console["Console I/O"]
node_arithmetic["Arithmetic demo<br/>[main.cpp]"]
node_month["Month selector<br/>[chai.cpp]"]
node_age_check["Age checks<br/>[math.cpp]"]
node_salary_check["Salary bands<br/>[include.cpp]"]
node_age_echo["Age echo<br/>[haha.cpp]"]
node_counter["Counting loop<br/>[42.cpp]"]
node_empty_loop["Loop example<br/>[bczin.cpp]"]
node_socket_demo["Socket demo<br/>[istad.cpp]"]
node_os_socket["Operating system"]

node_user -->|"runs"| node_arithmetic
node_arithmetic -->|"writes results"| node_console
node_user -->|"runs"| node_month
node_month -->|"reads and writes"| node_console
node_user -->|"runs"| node_age_check
node_age_check -->|"reads and writes"| node_console
node_user -->|"runs"| node_salary_check
node_salary_check -->|"reads and writes"| node_console
node_user -->|"runs"| node_age_echo
node_age_echo -->|"reads and writes"| node_console
node_user -->|"runs"| node_counter
node_counter -->|"writes values"| node_console
node_user -->|"runs"| node_empty_loop
node_empty_loop -->|"writes output"| node_console
node_user -->|"runs"| node_socket_demo
node_socket_demo -->|"writes status"| node_console
node_socket_demo -->|"creates and closes socket"| node_os_socket

click node_arithmetic "https://github.com/ly-rick/cpp_practice/blob/master/main.cpp"
click node_month "https://github.com/ly-rick/cpp_practice/blob/master/chai.cpp"
click node_age_check "https://github.com/ly-rick/cpp_practice/blob/master/math.cpp"
click node_salary_check "https://github.com/ly-rick/cpp_practice/blob/master/include.cpp"
click node_age_echo "https://github.com/ly-rick/cpp_practice/blob/master/haha.cpp"
click node_counter "https://github.com/ly-rick/cpp_practice/blob/master/42.cpp"
click node_empty_loop "https://github.com/ly-rick/cpp_practice/blob/master/bczin.cpp"
click node_socket_demo "https://github.com/ly-rick/cpp_practice/blob/master/istad.cpp"

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_user toneBlue
class node_console,node_os_socket toneIndigo
class node_arithmetic,node_month,node_age_check,node_salary_check,node_age_echo,node_counter,node_empty_loop,node_socket_demo toneTeal
```

## Components

### Other components

- **User**
- **Console I/O**
- [Arithmetic demo](https://github.com/ly-rick/cpp_practice/blob/master/main.cpp): `main.cpp`
- [Month selector](https://github.com/ly-rick/cpp_practice/blob/master/chai.cpp): `chai.cpp`
- [Age checks](https://github.com/ly-rick/cpp_practice/blob/master/math.cpp): `math.cpp`
- [Salary bands](https://github.com/ly-rick/cpp_practice/blob/master/include.cpp): `include.cpp`
- [Age echo](https://github.com/ly-rick/cpp_practice/blob/master/haha.cpp): `haha.cpp`
- [Counting loop](https://github.com/ly-rick/cpp_practice/blob/master/42.cpp): `42.cpp`
- [Loop example](https://github.com/ly-rick/cpp_practice/blob/master/bczin.cpp): `bczin.cpp`
- [Socket demo](https://github.com/ly-rick/cpp_practice/blob/master/istad.cpp): `istad.cpp`
- **Operating system**

## Connections

- User → Arithmetic demo: runs (evidence: `main.cpp`)
- Arithmetic demo → Console I/O: writes results (evidence: `main.cpp`)
- User → Month selector: runs (evidence: `chai.cpp`)
- Month selector → Console I/O: reads and writes (evidence: `chai.cpp`)
- User → Age checks: runs (evidence: `math.cpp`)
- Age checks → Console I/O: reads and writes (evidence: `math.cpp`)
- User → Salary bands: runs (evidence: `include.cpp`)
- Salary bands → Console I/O: reads and writes (evidence: `include.cpp`)
- User → Age echo: runs (evidence: `haha.cpp`)
- Age echo → Console I/O: reads and writes (evidence: `haha.cpp`)
- User → Counting loop: runs (evidence: `42.cpp`)
- Counting loop → Console I/O: writes values (evidence: `42.cpp`)
- User → Loop example: runs (evidence: `bczin.cpp`)
- Loop example → Console I/O: writes output (evidence: `bczin.cpp`)
- User → Socket demo: runs (evidence: `istad.cpp`)
- Socket demo → Console I/O: writes status (evidence: `istad.cpp`)
- Socket demo → Operating system: creates and closes socket (evidence: `istad.cpp`)
