# linmjie/teachingfreshmen architecture

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

- Interactive diagram: https://gitdiagram.com/linmjie/teachingfreshmen
- Repository: https://github.com/linmjie/teachingfreshmen

## Overview

This repository is a small, follow-along C++ learning collection, not a single application. Its runtime workflow is to run an individual console example or practice solution, provide input where requested, and see output or a computed result. The README points learners to the lesson resource; the examples cover introductory syntax and control flow, while practice programs demonstrate small interactive exercises. The graph treats these as independent programs rather than implying a shared runtime pipeline. Relationships are limited to the documented learning pointer and console interactions visible in sampled source.

Main entry points: [`practice/solutions/MonsterFight.cpp`](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/MonsterFight.cpp) (Monster fight solution), [`practice/solutions/AIGirlfriend.cpp`](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/AIGirlfriend.cpp) (AI Girlfriend solution), [`practice/solutions/CardsOdds.cpp`](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/CardsOdds.cpp) (Cards odds solution), [`practice/AIGirlfriend.md`](https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriend.md) (AI Girlfriend exercise)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning material"]
  node_resource["Follow-along resource<br/>[onlineResource.md]"]
  node_io_guide["I/O lesson<br/>[io.md]"]
end

subgraph group_basics["C++ examples"]
  node_hello["Hello World<br/>[helloworld.cpp]"]
  node_hello_c["C hello world<br/>[helloworldC.cpp]"]
  node_variables["Variables<br/>[variables.cpp]"]
  node_operators["Basic operators<br/>[basicOperators.cpp]"]
  node_strings["Making strings<br/>[makingStrings.cpp]"]
  node_hello_two["Hello World<br/>[helloworld.cpp]"]
  node_variables_two["Variables<br/>[variables.cpp]"]
  node_console_input["Console input<br/>[consoleInput.cpp]"]
  node_conditionals["Conditionals<br/>[conditionals.cpp]"]
  node_loops["Loops<br/>[whileloops.cpp]"]
end

subgraph group_practice["Practice programs"]
  node_ai_prompt["AI Girlfriend exercise<br/>[AIGirlfriend.md]"]
  node_ai_example["AI Girlfriend example"]
  node_ai_solution["AI Girlfriend solution<br/>[AIGirlfriend.cpp]"]
  node_cards_prompt["Cards odds exercise<br/>[CardsOdds.md]"]
  node_cards_solution["Cards odds solution<br/>[CardsOdds.cpp]"]
  node_monster_basic["Basic monster fight"]
  node_monster_advanced["Advanced monster fight"]
  node_monster_solution["Monster fight solution<br/>[MonsterFight.cpp]"]
  node_circle_prompt["Circle calculator exercise"]
  node_circle_solution["Circle calculator solution"]
  node_ai_sample_prompt["AI Girlfriend sample prompt"]
end

node_learner(("Learner"))

node_learner -->|"follows"| node_resource
node_learner -->|"runs"| node_hello
node_learner -->|"runs"| node_hello_two
node_learner -->|"enters input"| node_conditionals
node_learner -->|"provides input"| node_ai_solution
node_learner -->|"provides stats"| node_monster_solution
node_learner -->|"enters number"| node_cards_solution
node_learner -->|"chooses actions"| node_ai_example
node_ai_prompt -.->|"exercise solution"| node_ai_solution
node_cards_prompt -.->|"exercise solution"| node_cards_solution
node_monster_basic -.->|"exercise solution"| node_monster_solution
node_monster_advanced -.->|"exercise solution"| node_monster_solution
node_circle_prompt -.->|"exercise solution"| node_circle_solution

click node_resource "https://github.com/linmjie/teachingfreshmen/blob/main/lessons/onlineResource.md"
click node_io_guide "https://github.com/linmjie/teachingfreshmen/blob/main/lessons/io.md"
click node_hello "https://github.com/linmjie/teachingfreshmen/blob/main/dayone/helloworld.cpp"
click node_hello_c "https://github.com/linmjie/teachingfreshmen/blob/main/dayone/helloworldC.cpp"
click node_variables "https://github.com/linmjie/teachingfreshmen/blob/main/dayone/variables.cpp"
click node_operators "https://github.com/linmjie/teachingfreshmen/blob/main/dayone/basicOperators.cpp"
click node_strings "https://github.com/linmjie/teachingfreshmen/blob/main/dayone/makingStrings.cpp"
click node_hello_two "https://github.com/linmjie/teachingfreshmen/blob/main/dayone-parttwo/helloworld.cpp"
click node_variables_two "https://github.com/linmjie/teachingfreshmen/blob/main/dayone-parttwo/variables.cpp"
click node_console_input "https://github.com/linmjie/teachingfreshmen/blob/main/dayone-parttwo/consoleInput.cpp"
click node_conditionals "https://github.com/linmjie/teachingfreshmen/blob/main/daytwo/conditionals.cpp"
click node_loops "https://github.com/linmjie/teachingfreshmen/blob/main/daytwo/whileloops.cpp"
click node_ai_prompt "https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriend.md"
click node_ai_example "https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriendExample.cpp"
click node_ai_solution "https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/AIGirlfriend.cpp"
click node_cards_prompt "https://github.com/linmjie/teachingfreshmen/blob/main/practice/CardsOdds.md"
click node_cards_solution "https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/CardsOdds.cpp"
click node_monster_basic "https://github.com/linmjie/teachingfreshmen/blob/main/practice/MonsterFightBasic.md"
click node_monster_advanced "https://github.com/linmjie/teachingfreshmen/blob/main/practice/MonsterFightAdvanced.md"
click node_monster_solution "https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/MonsterFight.cpp"
click node_circle_prompt "https://github.com/linmjie/teachingfreshmen/blob/main/practice/circleCalculator.md"
click node_circle_solution "https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/circleCalculator.cpp"
click node_ai_sample_prompt "https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriendExample.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_resource,node_io_guide toneBlue
class node_hello,node_hello_c,node_variables,node_operators,node_strings,node_hello_two,node_variables_two,node_console_input,node_conditionals,node_loops toneAmber
class node_ai_prompt,node_ai_example,node_ai_solution,node_cards_prompt,node_cards_solution,node_monster_basic,node_monster_advanced,node_monster_solution,node_circle_prompt,node_circle_solution,node_ai_sample_prompt toneMint
class node_learner toneIndigo
```

## Components

### Learning material

- [Follow-along resource](https://github.com/linmjie/teachingfreshmen/blob/main/lessons/onlineResource.md): `lessons/onlineResource.md`
- [I/O lesson](https://github.com/linmjie/teachingfreshmen/blob/main/lessons/io.md): `lessons/io.md`

### C++ examples

- [Hello World](https://github.com/linmjie/teachingfreshmen/blob/main/dayone/helloworld.cpp): `dayone/helloworld.cpp`
- [C hello world](https://github.com/linmjie/teachingfreshmen/blob/main/dayone/helloworldC.cpp): `dayone/helloworldC.cpp`
- [Variables](https://github.com/linmjie/teachingfreshmen/blob/main/dayone/variables.cpp): `dayone/variables.cpp`
- [Basic operators](https://github.com/linmjie/teachingfreshmen/blob/main/dayone/basicOperators.cpp): `dayone/basicOperators.cpp`
- [Making strings](https://github.com/linmjie/teachingfreshmen/blob/main/dayone/makingStrings.cpp): `dayone/makingStrings.cpp`
- [Hello World](https://github.com/linmjie/teachingfreshmen/blob/main/dayone-parttwo/helloworld.cpp): `dayone-parttwo/helloworld.cpp`
- [Variables](https://github.com/linmjie/teachingfreshmen/blob/main/dayone-parttwo/variables.cpp): `dayone-parttwo/variables.cpp`
- [Console input](https://github.com/linmjie/teachingfreshmen/blob/main/dayone-parttwo/consoleInput.cpp): `dayone-parttwo/consoleInput.cpp`
- [Conditionals](https://github.com/linmjie/teachingfreshmen/blob/main/daytwo/conditionals.cpp): `daytwo/conditionals.cpp`
- [Loops](https://github.com/linmjie/teachingfreshmen/blob/main/daytwo/whileloops.cpp): `daytwo/whileloops.cpp`

### Practice programs

- [AI Girlfriend exercise](https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriend.md): `practice/AIGirlfriend.md`
- [AI Girlfriend example](https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriendExample.cpp): `practice/AIGirlfriendExample.cpp`
- [AI Girlfriend solution](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/AIGirlfriend.cpp): `practice/solutions/AIGirlfriend.cpp`
- [Cards odds exercise](https://github.com/linmjie/teachingfreshmen/blob/main/practice/CardsOdds.md): `practice/CardsOdds.md`
- [Cards odds solution](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/CardsOdds.cpp): `practice/solutions/CardsOdds.cpp`
- [Basic monster fight](https://github.com/linmjie/teachingfreshmen/blob/main/practice/MonsterFightBasic.md): `practice/MonsterFightBasic.md`
- [Advanced monster fight](https://github.com/linmjie/teachingfreshmen/blob/main/practice/MonsterFightAdvanced.md): `practice/MonsterFightAdvanced.md`
- [Monster fight solution](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/MonsterFight.cpp): `practice/solutions/MonsterFight.cpp`
- [Circle calculator exercise](https://github.com/linmjie/teachingfreshmen/blob/main/practice/circleCalculator.md): `practice/circleCalculator.md`
- [Circle calculator solution](https://github.com/linmjie/teachingfreshmen/blob/main/practice/solutions/circleCalculator.cpp): `practice/solutions/circleCalculator.cpp`
- [AI Girlfriend sample prompt](https://github.com/linmjie/teachingfreshmen/blob/main/practice/AIGirlfriendExample.cpp): `practice/AIGirlfriendExample.cpp`

### Other components

- **Learner**

## Connections

- Learner → Follow-along resource: follows (evidence: `README.md`)
- Learner → Hello World: runs (evidence: `dayone/helloworld.cpp`)
- Learner → Hello World: runs (evidence: `dayone-parttwo/helloworld.cpp`)
- Learner → Conditionals: enters input (evidence: `daytwo/conditionals.cpp`)
- Learner → AI Girlfriend solution: provides input (evidence: `practice/solutions/AIGirlfriend.cpp`)
- Learner → Monster fight solution: provides stats (evidence: `practice/solutions/MonsterFight.cpp`)
- Learner → Cards odds solution: enters number (evidence: `practice/solutions/CardsOdds.cpp`)
- Learner → AI Girlfriend example: chooses actions (evidence: `practice/AIGirlfriendExample.cpp`)
- AI Girlfriend exercise → AI Girlfriend solution: exercise solution
- Cards odds exercise → Cards odds solution: exercise solution
- Basic monster fight → Monster fight solution: exercise solution
- Advanced monster fight → Monster fight solution: exercise solution
- Circle calculator exercise → Circle calculator solution: exercise solution
