# paim20255/capstone-2 architecture

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

- Interactive diagram: https://gitdiagram.com/paim20255/capstone-2
- Repository: https://github.com/paim20255/capstone-2

## Overview

This is a small console-based pizza-ordering application. A user enters the home screen, starts an order, and can choose drink or garlic-knot options; the order calculates totals from those items. The sampled code shows pizza and checkout menu choices, but their handlers are empty, so no completed pizza or checkout flow is shown. Each add-item handler currently creates a new Order, rather than reusing a shared order. The graph reflects only relationships visible in the excerpts; RegularTopping has no shown runtime connection.

Main entry points: [`src/main/java/com/pluralsight/Main.java`](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Main.java) (Console screens), [`src/main/java/com/pluralsight/Order.java`](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Order.java) (Order totals), [`src/main/java/com/pluralsight/Drink.java`](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Drink.java) (Drink), [`src/main/java/com/pluralsight/GarlicKnots.java`](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/GarlicKnots.java) (Garlic knots)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Console interaction"]
  node_main["Console screens<br/>[Main.java]"]
end

subgraph group_menu["Order and menu"]
  node_order["Order totals<br/>[Order.java]"]
  node_menuitem["Menu item contract<br/>[MenuItem.java]"]
  node_drink["Drink<br/>[Drink.java]"]
  node_drinksize["Drink sizes<br/>[Drinksize.java]"]
  node_knots["Garlic knots<br/>[GarlicKnots.java]"]
  node_pizza["Pizza<br/>[Pizza.java]"]
  node_toppings["Regular toppings"]
end

node_user(("User"))

node_user -->|"chooses options"| node_main
node_main -->|"creates order"| node_order
node_main -->|"constructs drink"| node_drink
node_main -->|"parses size"| node_drinksize
node_main -->|"constructs knots"| node_knots
node_order -->|"stores and prices"| node_drink
node_order -->|"stores and prices"| node_knots
node_drink -->|"implements"| node_menuitem
node_knots -->|"implements"| node_menuitem
node_pizza -->|"implements"| node_menuitem

click node_main "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Main.java"
click node_order "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Order.java"
click node_menuitem "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/MenuItem.java"
click node_drink "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Drink.java"
click node_drinksize "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Drinksize.java"
click node_knots "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/GarlicKnots.java"
click node_pizza "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Pizza.java"
click node_toppings "https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/RegularTopping.java"

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_main,node_user toneBlue
class node_order,node_menuitem,node_drink,node_drinksize,node_knots,node_pizza,node_toppings toneAmber
```

## Components

### Console interaction

- [Console screens](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Main.java): `src/main/java/com/pluralsight/Main.java`

### Order and menu

- [Order totals](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Order.java): `src/main/java/com/pluralsight/Order.java`
- [Menu item contract](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/MenuItem.java): `src/main/java/com/pluralsight/MenuItem.java`
- [Drink](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Drink.java): `src/main/java/com/pluralsight/Drink.java`
- [Drink sizes](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Drinksize.java): `src/main/java/com/pluralsight/Drinksize.java`
- [Garlic knots](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/GarlicKnots.java): `src/main/java/com/pluralsight/GarlicKnots.java`
- [Pizza](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/Pizza.java): `src/main/java/com/pluralsight/Pizza.java`
- [Regular toppings](https://github.com/paim20255/capstone-2/blob/main/src/main/java/com/pluralsight/RegularTopping.java): `src/main/java/com/pluralsight/RegularTopping.java`

### Other components

- **User**

## Connections

- User → Console screens: chooses options (evidence: `src/main/java/com/pluralsight/Main.java`)
- Console screens → Order totals: creates order (evidence: `src/main/java/com/pluralsight/Main.java`)
- Console screens → Drink: constructs drink (evidence: `src/main/java/com/pluralsight/Main.java`)
- Console screens → Drink sizes: parses size (evidence: `src/main/java/com/pluralsight/Main.java`)
- Console screens → Garlic knots: constructs knots (evidence: `src/main/java/com/pluralsight/Main.java`)
- Order totals → Drink: stores and prices (evidence: `src/main/java/com/pluralsight/Order.java`)
- Order totals → Garlic knots: stores and prices (evidence: `src/main/java/com/pluralsight/Order.java`)
- Drink → Menu item contract: implements (evidence: `src/main/java/com/pluralsight/Drink.java`)
- Garlic knots → Menu item contract: implements (evidence: `src/main/java/com/pluralsight/GarlicKnots.java`)
- Pizza → Menu item contract: implements (evidence: `src/main/java/com/pluralsight/Pizza.java`)
