# amart3/comp5970 architecture

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

- Interactive diagram: https://gitdiagram.com/amart3/comp5970
- Repository: https://github.com/amart3/comp5970

## Overview

This repository is a collection of independent Swift/UIKit coursework apps: loan calculators, a team-logo selector, an expression calculator, and two nearly identical to-do applications. The main user workflow is button or text input, controller-level validation/calculation or task editing, then display or persistence. The sampled code directly supports the calculator and to-do flows; storyboard wiring and unsampled model implementations are represented only where the tree provides exact paths.

Main entry points: [`Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoTableViewController.swift`](https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoTableViewController.swift) (Task List Table), [`Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoTableViewController.swift`](https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoTableViewController.swift) (Task List Table), [`Final Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift`](https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift) (Calculator Screen), [`Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoViewController.swift`](https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoViewController.swift) (Task Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_loans["Loan Tools"]
  node_playground_loan["Playground Loan<br/>[Contents.swift]"]
  node_playground_formula["Loan Formula<br/>[Contents.swift]"]
  node_loan_screen["Loan Screen"]
  node_loan_formula["Payment Formula"]
end

subgraph group_logos["Logo Selector"]
  node_logo_screen["Logo Screen"]
  node_logo_assets["Team Logos<br/>[Assets.xcassets]"]
end

subgraph group_calc["Expression Calculator"]
  node_calculator_screen["Calculator Screen"]
  node_input_validator["Input Validator"]
  node_expression_engine["Expression Engine"]
end

subgraph group_todos["To-Do Apps"]
  node_todo3_table["Task List Table"]
  node_todo3_detail["Task Editor"]
  node_todo3_model["Task Model<br/>[ToDoList.swift]"]
  node_todo3_store[("Task Archive")]
  node_todo4_table["Task List Table"]
  node_todo4_detail["Task Editor"]
  node_todo4_model["Task Model<br/>[ToDoList.swift]"]
  node_todo4_store[("Task Archive")]
end

node_user(("User"))

node_user -->|"enters inputs"| node_playground_loan
node_playground_loan -->|"calculates"| node_playground_formula
node_playground_formula -->|"prints result"| node_playground_loan
node_user -->|"enters inputs"| node_loan_screen
node_loan_screen -->|"calculates"| node_loan_formula
node_loan_formula -->|"returns payment"| node_loan_screen
node_user -->|"presses button"| node_logo_screen
node_logo_screen -->|"loads logo"| node_logo_assets
node_user -->|"presses keys"| node_calculator_screen
node_calculator_screen -->|"validates input"| node_input_validator
node_calculator_screen -->|"evaluates expression"| node_expression_engine
node_expression_engine -->|"returns result"| node_calculator_screen
node_user -->|"manages tasks"| node_todo3_table
node_todo3_table -->|"loads archive"| node_todo3_store
node_todo3_table -->|"opens editor"| node_todo3_detail
node_todo3_detail -->|"creates task"| node_todo3_model
node_todo3_table -->|"saves archive"| node_todo3_store
node_todo3_detail -->|"unwinds changes"| node_todo3_table
node_user -->|"manages tasks"| node_todo4_table
node_todo4_table -->|"loads archive"| node_todo4_store
node_todo4_table -->|"opens editor"| node_todo4_detail
node_todo4_detail -->|"creates task"| node_todo4_model
node_todo4_table -->|"saves archive"| node_todo4_store
node_todo4_detail -->|"unwinds changes"| node_todo4_table

click node_playground_loan "https://github.com/amart3/comp5970/blob/main/Assignment1.playground/Contents.swift"
click node_playground_formula "https://github.com/amart3/comp5970/blob/main/Assignment1.playground/Contents.swift"
click node_loan_screen "https://github.com/amart3/comp5970/blob/main/Program2B/Prog2BLam0097Su21/Prog2BLam0097Su21/ViewController.swift"
click node_loan_formula "https://github.com/amart3/comp5970/blob/main/Program2B/Prog2BLam0097Su21/Prog2BLam0097Su21/ViewController.swift"
click node_logo_screen "https://github.com/amart3/comp5970/blob/main/Program2A/Prog2ALam0097SU21/Prog2ALam0097SU21/ViewController.swift"
click node_logo_assets "https://github.com/amart3/comp5970/tree/main/Program2A/Prog2ALam0097SU21/Prog2ALam0097SU21/Assets.xcassets"
click node_calculator_screen "https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift"
click node_input_validator "https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift"
click node_expression_engine "https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift"
click node_todo3_table "https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoTableViewController.swift"
click node_todo3_detail "https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoViewController.swift"
click node_todo3_model "https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoList.swift"
click node_todo4_table "https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoTableViewController.swift"
click node_todo4_detail "https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoViewController.swift"
click node_todo4_model "https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoList.swift"

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_playground_loan,node_playground_formula,node_loan_screen,node_loan_formula,node_user toneBlue
class node_logo_screen,node_logo_assets toneAmber
class node_calculator_screen,node_input_validator,node_expression_engine toneMint
class node_todo3_table,node_todo3_detail,node_todo3_model,node_todo3_store,node_todo4_table,node_todo4_detail,node_todo4_model,node_todo4_store toneRose
```

## Components

### Loan Tools

- [Playground Loan](https://github.com/amart3/comp5970/blob/main/Assignment1.playground/Contents.swift): `Assignment1.playground/Contents.swift`
- [Loan Formula](https://github.com/amart3/comp5970/blob/main/Assignment1.playground/Contents.swift): `Assignment1.playground/Contents.swift`
- [Loan Screen](https://github.com/amart3/comp5970/blob/main/Program2B/Prog2BLam0097Su21/Prog2BLam0097Su21/ViewController.swift): `Program2B/Prog2BLam0097Su21/Prog2BLam0097Su21/ViewController.swift`
- [Payment Formula](https://github.com/amart3/comp5970/blob/main/Program2B/Prog2BLam0097Su21/Prog2BLam0097Su21/ViewController.swift): `Program2B/Prog2BLam0097Su21/Prog2BLam0097Su21/ViewController.swift`

### Logo Selector

- [Logo Screen](https://github.com/amart3/comp5970/blob/main/Program2A/Prog2ALam0097SU21/Prog2ALam0097SU21/ViewController.swift): `Program2A/Prog2ALam0097SU21/Prog2ALam0097SU21/ViewController.swift`
- [Team Logos](https://github.com/amart3/comp5970/tree/main/Program2A/Prog2ALam0097SU21/Prog2ALam0097SU21/Assets.xcassets): `Program2A/Prog2ALam0097SU21/Prog2ALam0097SU21/Assets.xcassets`

### Expression Calculator

- [Calculator Screen](https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift): `Final Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift`
- [Input Validator](https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift): `Final Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift`
- [Expression Engine](https://github.com/amart3/comp5970/blob/main/Final%20Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift): `Final Program/FinalProgLam0097SU21/FinalProgLam0097SU21/ViewController.swift`

### To-Do Apps

- [Task List Table](https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoTableViewController.swift): `Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoTableViewController.swift`
- [Task Editor](https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoViewController.swift): `Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoViewController.swift`
- [Task Model](https://github.com/amart3/comp5970/blob/main/Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoList.swift): `Program3/Prog3Lam0097SU21/Prog3Lam0097SU21/ToDoList.swift`
- **Task Archive**
- [Task List Table](https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoTableViewController.swift): `Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoTableViewController.swift`
- [Task Editor](https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoViewController.swift): `Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoViewController.swift`
- [Task Model](https://github.com/amart3/comp5970/blob/main/Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoList.swift): `Program4/Prog4Lam0097SU21/Prog4Lam0097SU21/ToDoList.swift`
- **Task Archive**

### Other components

- **User**

## Connections

- User → Playground Loan: enters inputs
- Playground Loan → Loan Formula: calculates
- Loan Formula → Playground Loan: prints result
- User → Loan Screen: enters inputs
- Loan Screen → Payment Formula: calculates
- Payment Formula → Loan Screen: returns payment
- User → Logo Screen: presses button
- Logo Screen → Team Logos: loads logo
- User → Calculator Screen: presses keys
- Calculator Screen → Input Validator: validates input
- Calculator Screen → Expression Engine: evaluates expression
- Expression Engine → Calculator Screen: returns result
- User → Task List Table: manages tasks
- Task List Table → Task Archive: loads archive
- Task List Table → Task Editor: opens editor
- Task Editor → Task Model: creates task
- Task List Table → Task Archive: saves archive
- Task Editor → Task List Table: unwinds changes
- User → Task List Table: manages tasks
- Task List Table → Task Archive: loads archive
- Task List Table → Task Editor: opens editor
- Task Editor → Task Model: creates task
- Task List Table → Task Archive: saves archive
- Task Editor → Task List Table: unwinds changes
