# ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project architecture

> Architecture diagram of the GitHub repository ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project
- Repository: https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project

## Overview

This Java Swing dealership app lets a customer choose vehicles, build a cart, enter purchase details and payment, confirm the purchase, and save an invoice. The GUI coordinates the workflow; vehicle classes provide catalog data and purchase holds transaction values. The README describes running the application but gives no additional product capabilities. Connections shown here are limited to calls or dependencies visible in the excerpts; the sales file is the invoice destination named by the saver.

Main entry points: [`VDM/VehiGUI.java`](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VehiGUI.java) (Dealership GUI), [`VDM/Vehicle.java`](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Vehicle.java) (Vehicle), [`VDM/Motorbike.java`](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Motorbike.java) (Motorbike), [`VDM/InvoiceSaver.java`](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/InvoiceSaver.java) (Invoice saver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application entry"]
  node_launcher["Application launcher<br/>[VDM.java]"]
  node_gui["Dealership GUI<br/>[VehiGUI.java]"]
end

subgraph group_catalog["Vehicle catalog"]
  node_vehicle_type["Vehicle contract<br/>[IVehicle.java]"]
  node_vehicle["Vehicle<br/>[Vehicle.java]"]
  node_motorbike["Motorbike<br/>[Motorbike.java]"]
end

subgraph group_sales["Purchase workflow"]
  node_purchase["Purchase record<br/>[Purchase.java]"]
  node_invoice_saver["Invoice saver<br/>[InvoiceSaver.java]"]
  node_sales_file["Sales information file"]
end

node_customer(("Customer"))

node_launcher -->|"opens"| node_gui
node_customer -->|"uses"| node_gui
node_gui -->|"creates"| node_vehicle
node_gui -->|"creates"| node_motorbike
node_vehicle -->|"extends"| node_vehicle_type
node_motorbike -->|"extends"| node_vehicle
node_gui -->|"processes"| node_purchase
node_gui -->|"saves invoice"| node_invoice_saver
node_invoice_saver -->|"appends"| node_sales_file

click node_launcher "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VDM.java"
click node_gui "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VehiGUI.java"
click node_vehicle_type "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/IVehicle.java"
click node_vehicle "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Vehicle.java"
click node_motorbike "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Motorbike.java"
click node_purchase "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Purchase.java"
click node_invoice_saver "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/InvoiceSaver.java"
click node_sales_file "https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VehicleSalesInfo.txt"

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_launcher,node_gui toneBlue
class node_vehicle_type,node_vehicle,node_motorbike toneAmber
class node_purchase,node_invoice_saver,node_sales_file toneMint
class node_customer toneIndigo
```

## Components

### Application entry

- [Application launcher](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VDM.java): `VDM/VDM.java`
- [Dealership GUI](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VehiGUI.java): `VDM/VehiGUI.java`

### Vehicle catalog

- [Vehicle contract](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/IVehicle.java): `VDM/IVehicle.java`
- [Vehicle](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Vehicle.java): `VDM/Vehicle.java`
- [Motorbike](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Motorbike.java): `VDM/Motorbike.java`

### Purchase workflow

- [Purchase record](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/Purchase.java): `VDM/Purchase.java`
- [Invoice saver](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/InvoiceSaver.java): `VDM/InvoiceSaver.java`
- [Sales information file](https://github.com/ayeadbinalamshaishab/vehicle-dealership-management-java-mini-project/blob/main/VDM/VehicleSalesInfo.txt): `VDM/VehicleSalesInfo.txt`

### Other components

- **Customer**

## Connections

- Application launcher → Dealership GUI: opens (evidence: `VDM/VDM.java`)
- Customer → Dealership GUI: uses (evidence: `VDM/VehiGUI.java`)
- Dealership GUI → Vehicle: creates (evidence: `VDM/VehiGUI.java`)
- Dealership GUI → Motorbike: creates (evidence: `VDM/VehiGUI.java`)
- Vehicle → Vehicle contract: extends (evidence: `VDM/Vehicle.java`)
- Motorbike → Vehicle: extends (evidence: `VDM/Motorbike.java`)
- Dealership GUI → Purchase record: processes (evidence: `VDM/VehiGUI.java`)
- Dealership GUI → Invoice saver: saves invoice (evidence: `VDM/VehiGUI.java`)
- Invoice saver → Sales information file: appends (evidence: `VDM/InvoiceSaver.java`)
