# sdaley2/cop2373 architecture

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

- Interactive diagram: https://gitdiagram.com/sdaley2/cop2373
- Repository: https://github.com/sdaley2/cop2373

## Overview

This repository contains four independent command-line exercises, not one integrated application: ticket sales, expense analysis, spam scoring, and product discounts. Each starts in its own script and reads or prints through the console. The graph preserves those separate workflows and the functions they call. The tree also contains two generic greeting scripts, which are unrelated practice snippets and are omitted. Evidence is limited to the supplied tree and source excerpts; no README or additional subsystem documentation was provided.

Main entry points: [`SummerDaley_ProgrammingExercise_2.py`](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py) (Scoring Controller), [`SummerDaley_ProgrammingExercise_1.py`](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py) (Sale Controller), [`SummerDaley_ProgrammingExercise3.py`](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise3.py) (Entry Controller), [`SummerDaley_DebuggingExercise.py`](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py) (Product Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tickets["Ticket Sales"]
  node_ticket_main["Sale Controller"]
  node_ticket_count["Request Validation"]
  node_ticket_display["Inventory Display"]
end

subgraph group_expenses["Expense Analysis"]
  node_expense_main["Entry Controller"]
  node_expense_analysis["Expense Analysis"]
end

subgraph group_spam["Spam Scoring"]
  node_spam_main["Scoring Controller"]
  node_spam_check["Phrase Scanner"]
  node_spam_rate["Likelihood Rating"]
end

subgraph group_discounts["Discount Calculation"]
  node_discount_main["Product Runner"]
  node_discount_calc["Discount Calculator"]
  node_discount_apply["Price Adjuster"]
end

node_buyer(("Buyer"))
node_expense_user(("Expense User"))
node_spam_user(("Email User"))
node_discount_user(("Program User"))

node_buyer -->|"starts sale"| node_ticket_main
node_ticket_main -->|"requests count"| node_ticket_count
node_ticket_count -->|"prompts for"| node_buyer
node_ticket_main -->|"displays inventory"| node_ticket_display
node_ticket_main -->|"reports results"| node_buyer
node_expense_user -->|"enters expenses"| node_expense_main
node_expense_main -->|"prompts for"| node_expense_user
node_expense_main -->|"analyzes expenses"| node_expense_analysis
node_expense_main -->|"prints summary"| node_expense_user
node_spam_user -->|"enters message"| node_spam_main
node_spam_main -->|"prompts for"| node_spam_user
node_spam_main -->|"scans message"| node_spam_check
node_spam_main -->|"rates score"| node_spam_rate
node_spam_main -->|"prints results"| node_spam_user
node_discount_user -->|"runs program"| node_discount_main
node_discount_main -->|"calculates discount"| node_discount_calc
node_discount_main -->|"applies discount"| node_discount_apply
node_discount_main -->|"prints prices"| node_discount_user

click node_ticket_main "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py"
click node_ticket_count "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py"
click node_ticket_display "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py"
click node_expense_main "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise3.py"
click node_expense_analysis "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise3.py"
click node_spam_main "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py"
click node_spam_check "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py"
click node_spam_rate "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py"
click node_discount_main "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py"
click node_discount_calc "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py"
click node_discount_apply "https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py"

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_ticket_main,node_ticket_count,node_ticket_display,node_expense_user,node_spam_user,node_discount_user toneBlue
class node_expense_main,node_expense_analysis toneAmber
class node_spam_main,node_spam_check,node_spam_rate toneMint
class node_discount_main,node_discount_calc,node_discount_apply toneRose
class node_buyer toneIndigo
```

## Components

### Ticket Sales

- [Sale Controller](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py): `SummerDaley_ProgrammingExercise_1.py`
- [Request Validation](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py): `SummerDaley_ProgrammingExercise_1.py`
- [Inventory Display](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_1.py): `SummerDaley_ProgrammingExercise_1.py`

### Expense Analysis

- [Entry Controller](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise3.py): `SummerDaley_ProgrammingExercise3.py`
- [Expense Analysis](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise3.py): `SummerDaley_ProgrammingExercise3.py`

### Spam Scoring

- [Scoring Controller](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py): `SummerDaley_ProgrammingExercise_2.py`
- [Phrase Scanner](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py): `SummerDaley_ProgrammingExercise_2.py`
- [Likelihood Rating](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_ProgrammingExercise_2.py): `SummerDaley_ProgrammingExercise_2.py`

### Discount Calculation

- [Product Runner](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py): `SummerDaley_DebuggingExercise.py`
- [Discount Calculator](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py): `SummerDaley_DebuggingExercise.py`
- [Price Adjuster](https://github.com/sdaley2/cop2373/blob/master/SummerDaley_DebuggingExercise.py): `SummerDaley_DebuggingExercise.py`

### Other components

- **Buyer**
- **Expense User**
- **Email User**
- **Program User**

## Connections

- Buyer → Sale Controller: starts sale
- Sale Controller → Request Validation: requests count
- Request Validation → Buyer: prompts for
- Sale Controller → Inventory Display: displays inventory
- Sale Controller → Buyer: reports results
- Expense User → Entry Controller: enters expenses
- Entry Controller → Expense User: prompts for
- Entry Controller → Expense Analysis: analyzes expenses
- Entry Controller → Expense User: prints summary
- Email User → Scoring Controller: enters message
- Scoring Controller → Email User: prompts for
- Scoring Controller → Phrase Scanner: scans message
- Scoring Controller → Likelihood Rating: rates score
- Scoring Controller → Email User: prints results
- Program User → Product Runner: runs program
- Product Runner → Discount Calculator: calculates discount
- Product Runner → Price Adjuster: applies discount
- Product Runner → Program User: prints prices
