# mathisld/object-oriented-programming-oop- architecture

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

- Interactive diagram: https://gitdiagram.com/mathisld/object-oriented-programming-oop-
- Repository: https://github.com/mathisld/object-oriented-programming-oop-

## Overview

This repository is a set of C++ teaching demos for binary-operation records and class-versus-struct object design. Users enter arithmetic expressions or use hard-coded examples; the demos construct objects, display or evaluate them, and some write results to text files. The three binary-operation programs are separate variants, not stages of one application. Likewise, the class and struct examples demonstrate different interfaces and resource-management styles. Relationships below follow the sampled entry points and headers; the README provides no additional capability detail.

Main entry points: [`BINOPS/main.cpp`](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/main.cpp) (Basic Calculator), [`BINOPS/class/main.cpp`](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/main.cpp) (Class Calculator), [`BINOPS/struct/main.cpp`](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/main.cpp) (Struct Calculator), [`MYCLASS/class/MyClass.h`](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/MyClass.h) (Managed MyClass)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_binops["Binary Operations"]
  node_rootapp["Basic Calculator<br/>[main.cpp]"]
  node_rootbinops["Basic Binops<br/>[Binops.h]"]
  node_rootfile["Practice Results"]
  node_classapp["Class Calculator<br/>[main.cpp]"]
  node_classbinops["Class Binops<br/>[Binops.h]"]
  node_classfile["Class Tuples<br/>[tuples.txt]"]
  node_structapp["Struct Calculator<br/>[main.cpp]"]
  node_structbinops["Struct Binops<br/>[Binops.h]"]
  node_structfile["Struct Tuples<br/>[tuples.txt]"]
end

subgraph group_classdemo["Class Examples"]
  node_classmain["Class Demo<br/>[main.cpp]"]
  node_myclass["Managed MyClass<br/>[MyClass.h]"]
  node_refclass["Reference Class<br/>[RefClass.h]"]
end

subgraph group_structdemo["Struct Examples"]
  node_structmain["Struct Demo<br/>[main.cpp]"]
  node_mystruct["MyClass Struct<br/>[MyClass.h]"]
  node_refstruct["Reference Struct<br/>[RefClass.h]"]
end

node_user(("Console User"))

node_user -->|"enters operands"| node_rootapp
node_rootapp -->|"sets operands"| node_rootbinops
node_rootapp -->|"writes results"| node_rootfile
node_user -->|"enters expression"| node_classapp
node_classapp -->|"initializes and evaluates"| node_classbinops
node_classapp -->|"writes tuples"| node_classfile
node_user -->|"enters expression"| node_structapp
node_structapp -->|"initializes records"| node_structbinops
node_structapp -->|"writes tuples"| node_structfile
node_classmain -->|"constructs and calls"| node_myclass
node_myclass -->|"allocates and reads"| node_refclass
node_structmain -->|"initializes and calls"| node_mystruct
node_mystruct -->|"allocates and reads"| node_refstruct

click node_rootapp "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/main.cpp"
click node_rootbinops "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/Binops.h"
click node_rootfile "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/practive_task_02_text.txt"
click node_classapp "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/main.cpp"
click node_classbinops "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/Binops.h"
click node_classfile "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/tuples.txt"
click node_structapp "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/main.cpp"
click node_structbinops "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/Binops.h"
click node_structfile "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/tuples.txt"
click node_classmain "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/main.cpp"
click node_myclass "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/MyClass.h"
click node_refclass "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/RefClass.h"
click node_structmain "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/struct/main.cpp"
click node_mystruct "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/struct/MyClass.h"
click node_refstruct "https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/struct/RefClass.h"

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_rootapp,node_rootbinops,node_rootfile,node_classapp,node_classbinops,node_classfile,node_structapp,node_structbinops,node_structfile,node_user toneBlue
class node_classmain,node_myclass,node_refclass toneAmber
class node_structmain,node_mystruct,node_refstruct toneMint
```

## Components

### Binary Operations

- [Basic Calculator](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/main.cpp): `BINOPS/main.cpp`
- [Basic Binops](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/Binops.h): `BINOPS/Binops.h`
- [Practice Results](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/practive_task_02_text.txt): `BINOPS/practive_task_02_text.txt`
- [Class Calculator](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/main.cpp): `BINOPS/class/main.cpp`
- [Class Binops](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/Binops.h): `BINOPS/class/Binops.h`
- [Class Tuples](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/class/tuples.txt): `BINOPS/class/tuples.txt`
- [Struct Calculator](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/main.cpp): `BINOPS/struct/main.cpp`
- [Struct Binops](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/Binops.h): `BINOPS/struct/Binops.h`
- [Struct Tuples](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/BINOPS/struct/tuples.txt): `BINOPS/struct/tuples.txt`

### Class Examples

- [Class Demo](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/main.cpp): `MYCLASS/class/main.cpp`
- [Managed MyClass](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/MyClass.h): `MYCLASS/class/MyClass.h`
- [Reference Class](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/class/RefClass.h): `MYCLASS/class/RefClass.h`

### Struct Examples

- [Struct Demo](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/struct/main.cpp): `MYCLASS/struct/main.cpp`
- [MyClass Struct](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/struct/MyClass.h): `MYCLASS/struct/MyClass.h`
- [Reference Struct](https://github.com/mathisld/object-oriented-programming-oop-/blob/main/MYCLASS/struct/RefClass.h): `MYCLASS/struct/RefClass.h`

### Other components

- **Console User**

## Connections

- Console User → Basic Calculator: enters operands (evidence: `BINOPS/main.cpp`)
- Basic Calculator → Basic Binops: sets operands (evidence: `BINOPS/main.cpp`)
- Basic Calculator → Practice Results: writes results (evidence: `BINOPS/main.cpp`)
- Console User → Class Calculator: enters expression (evidence: `BINOPS/class/main.cpp`)
- Class Calculator → Class Binops: initializes and evaluates (evidence: `BINOPS/class/main.cpp`)
- Class Calculator → Class Tuples: writes tuples (evidence: `BINOPS/class/main.cpp`)
- Console User → Struct Calculator: enters expression (evidence: `BINOPS/struct/main.cpp`)
- Struct Calculator → Struct Binops: initializes records (evidence: `BINOPS/struct/main.cpp`)
- Struct Calculator → Struct Tuples: writes tuples (evidence: `BINOPS/struct/main.cpp`)
- Class Demo → Managed MyClass: constructs and calls (evidence: `MYCLASS/class/main.cpp`)
- Managed MyClass → Reference Class: allocates and reads (evidence: `MYCLASS/class/MyClass.h`)
- Struct Demo → MyClass Struct: initializes and calls (evidence: `MYCLASS/struct/main.cpp`)
- MyClass Struct → Reference Struct: allocates and reads (evidence: `MYCLASS/struct/MyClass.h`)
