# bhuvaneshcloud27/vehicle_rental_mgnt_sys architecture

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

- Interactive diagram: https://gitdiagram.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys
- Repository: https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys

## Overview

This small Java demo models vehicle rentals: Main creates a rental system, adds sample vehicles, displays them, removes the vehicle with ID 2, and displays the remaining list. RentalSystem owns the in-memory collection and its add, remove, and display operations. Vehicle defines shared identity and fare-reporting behavior; Bike, Car, and Truck provide distinct fare calculations. The README and excerpts document these runtime relationships, so no external services or persistence are shown.

Main entry points: [`Vehicle.java`](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Vehicle.java) (Vehicle base), [`Main.java`](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Main.java) (Demo workflow), [`Bike.java`](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Bike.java) (Bike fare), [`Car.java`](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Car.java) (Car fare)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Demo entry"]
  node_main["Demo workflow<br/>[Main.java]"]
end

subgraph group_rental["Rental management"]
  node_rental_system["Rental system<br/>[RentalSystem.java]"]
end

subgraph group_vehicles["Vehicle types"]
  node_vehicle["Vehicle base<br/>[Vehicle.java]"]
  node_bike["Bike fare<br/>[Bike.java]"]
  node_car["Car fare<br/>[Car.java]"]
  node_truck["Truck fare<br/>[Truck.java]"]
end

node_user(("Demo runner"))

node_user -->|"runs"| node_main
node_main -->|"creates and invokes"| node_rental_system
node_main -->|"constructs"| node_bike
node_main -->|"constructs"| node_car
node_main -->|"constructs"| node_truck
node_rental_system -->|"stores and displays"| node_vehicle
node_bike -->|"extends"| node_vehicle
node_car -->|"extends"| node_vehicle
node_truck -->|"extends"| node_vehicle
node_vehicle -->|"dispatches fare"| node_bike
node_vehicle -->|"dispatches fare"| node_car
node_vehicle -->|"dispatches fare"| node_truck

click node_main "https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Main.java"
click node_rental_system "https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/RentalSystem.java"
click node_vehicle "https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Vehicle.java"
click node_bike "https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Bike.java"
click node_car "https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Car.java"
click node_truck "https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Truck.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 toneBlue
class node_rental_system toneAmber
class node_vehicle,node_bike,node_car,node_truck toneMint
class node_user toneIndigo
```

## Components

### Demo entry

- [Demo workflow](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Main.java): `Main.java`

### Rental management

- [Rental system](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/RentalSystem.java): `RentalSystem.java`

### Vehicle types

- [Vehicle base](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Vehicle.java): `Vehicle.java`
- [Bike fare](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Bike.java): `Bike.java`
- [Car fare](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Car.java): `Car.java`
- [Truck fare](https://github.com/bhuvaneshcloud27/vehicle_rental_mgnt_sys/blob/main/Truck.java): `Truck.java`

### Other components

- **Demo runner**

## Connections

- Demo runner → Demo workflow: runs (evidence: `readme.MD`)
- Demo workflow → Rental system: creates and invokes (evidence: `Main.java`)
- Demo workflow → Bike fare: constructs (evidence: `Main.java`)
- Demo workflow → Car fare: constructs (evidence: `Main.java`)
- Demo workflow → Truck fare: constructs (evidence: `Main.java`)
- Rental system → Vehicle base: stores and displays (evidence: `RentalSystem.java`)
- Bike fare → Vehicle base: extends (evidence: `Bike.java`)
- Car fare → Vehicle base: extends (evidence: `Car.java`)
- Truck fare → Vehicle base: extends (evidence: `Truck.java`)
- Vehicle base → Bike fare: dispatches fare (evidence: `Vehicle.java`)
- Vehicle base → Car fare: dispatches fare (evidence: `Vehicle.java`)
- Vehicle base → Truck fare: dispatches fare (evidence: `Vehicle.java`)
