# cleancodeclass/video-rental architecture

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

- Interactive diagram: https://gitdiagram.com/cleancodeclass/video-rental
- Repository: https://github.com/cleancodeclass/video-rental

## Overview

This is a small video-rental billing program. Its central workflow is to collect a customer’s rentals, calculate charges and frequent-renter points, and produce a statement. Customer owns that calculation; Rental supplies rental duration and its Movie, while Movie supplies the title and price category. The excerpts show no application entry point or output destination, so the initiating user is shown without an asserted connection.

Main entry points: [`src/com/videorental/Customer.java`](https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Customer.java) (Customer Statement), [`src/com/videorental/Rental.java`](https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Rental.java) (Rental), [`src/com/videorental/Movie.java`](https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Movie.java) (Movie)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_customer["Customer Statement<br/>[Customer.java]"]
node_rental["Rental<br/>[Rental.java]"]
node_movie["Movie<br/>[Movie.java]"]

node_customer -->|"reads rentals"| node_rental
node_customer -->|"reads details"| node_movie
node_rental -->|"stores and returns"| node_movie

click node_customer "https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Customer.java"
click node_rental "https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Rental.java"
click node_movie "https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Movie.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_user toneBlue
class node_customer,node_rental,node_movie toneTeal
```

## Components

### Other components

- **User**
- [Customer Statement](https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Customer.java): `src/com/videorental/Customer.java`
- [Rental](https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Rental.java): `src/com/videorental/Rental.java`
- [Movie](https://github.com/cleancodeclass/video-rental/blob/master/src/com/videorental/Movie.java): `src/com/videorental/Movie.java`

## Connections

- Customer Statement → Rental: reads rentals (evidence: `src/com/videorental/Customer.java`)
- Customer Statement → Movie: reads details (evidence: `src/com/videorental/Customer.java`)
- Rental → Movie: stores and returns (evidence: `src/com/videorental/Rental.java`)
