# morepancakestacks/oop101sample-hoteldelluna architecture

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

- Interactive diagram: https://gitdiagram.com/morepancakestacks/oop101sample-hoteldelluna
- Repository: https://github.com/morepancakestacks/oop101sample-hoteldelluna

## Overview

Hotel Del Luna is a small Java teaching model for room and conference-hall bookings. The runtime starts in Main: it creates a StandardRoom and a ConferenceHall through the Bookable interface, then invokes booking on both. HotelRoom holds shared room state and booking behavior; concrete room classes supply room types and feature displays, while ConferenceHall maintains its own booking state. The excerpts support this core flow and the README describes the inheritance and abstraction; no persistence or external services are shown.

Main entry points: [`src/HotelRoom.java`](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/HotelRoom.java) (Hotel room base), [`src/Main.java`](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/Main.java) (Main), [`src/RoomType.java`](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/RoomType.java) (Room type), [`src/StandardRoom.java`](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/StandardRoom.java) (Standard room)

## Diagram (Mermaid)

```mermaid
flowchart TD

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

subgraph group_booking["Bookable entities"]
  node_bookable["Bookable contract<br/>[Bookable.java]"]
  node_conference["Conference hall"]
end

subgraph group_rooms["Room model"]
  node_hotelroom["Hotel room base<br/>[HotelRoom.java]"]
  node_standard["Standard room<br/>[StandardRoom.java]"]
  node_deluxe["Deluxe room<br/>[DeluxeRoom.java]"]
  node_suite["Suite room<br/>[SuiteRoom.java]"]
  node_roomtype["Room type<br/>[RoomType.java]"]
  node_roomstatus["Room status<br/>[RoomStatus.java]"]
end

node_user(("Program user"))

node_user -->|"runs"| node_main
node_main -->|"creates"| node_standard
node_main -->|"creates"| node_conference
node_main -->|"books via"| node_bookable
node_hotelroom -->|"implements"| node_bookable
node_conference -->|"implements"| node_bookable
node_standard -->|"extends"| node_hotelroom
node_deluxe -->|"extends"| node_hotelroom
node_suite -->|"extends"| node_hotelroom
node_hotelroom -->|"stores"| node_roomtype
node_hotelroom -->|"tracks"| node_roomstatus
node_standard -->|"sets type"| node_roomtype
node_deluxe -->|"sets type"| node_roomtype
node_suite -->|"sets type"| node_roomtype

click node_main "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/Main.java"
click node_bookable "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/Bookable.java"
click node_conference "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/ConferenceHall.java"
click node_hotelroom "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/HotelRoom.java"
click node_standard "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/StandardRoom.java"
click node_deluxe "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/DeluxeRoom.java"
click node_suite "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/SuiteRoom.java"
click node_roomtype "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/RoomType.java"
click node_roomstatus "https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/RoomStatus.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_bookable,node_conference toneAmber
class node_hotelroom,node_standard,node_deluxe,node_suite,node_roomtype,node_roomstatus toneMint
```

## Components

### Program entry

- [Main](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/Main.java): `src/Main.java`

### Bookable entities

- [Bookable contract](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/Bookable.java): `src/Bookable.java`
- [Conference hall](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/ConferenceHall.java): `src/ConferenceHall.java`

### Room model

- [Hotel room base](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/HotelRoom.java): `src/HotelRoom.java`
- [Standard room](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/StandardRoom.java): `src/StandardRoom.java`
- [Deluxe room](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/DeluxeRoom.java): `src/DeluxeRoom.java`
- [Suite room](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/SuiteRoom.java): `src/SuiteRoom.java`
- [Room type](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/RoomType.java): `src/RoomType.java`
- [Room status](https://github.com/morepancakestacks/oop101sample-hoteldelluna/blob/main/src/RoomStatus.java): `src/RoomStatus.java`

### Other components

- **Program user**

## Connections

- Program user → Main: runs (evidence: `README.md`)
- Main → Standard room: creates (evidence: `src/Main.java`)
- Main → Conference hall: creates (evidence: `src/Main.java`)
- Main → Bookable contract: books via (evidence: `src/Main.java`)
- Hotel room base → Bookable contract: implements (evidence: `README.md`)
- Conference hall → Bookable contract: implements (evidence: `src/ConferenceHall.java`)
- Standard room → Hotel room base: extends (evidence: `README.md`)
- Deluxe room → Hotel room base: extends (evidence: `README.md`)
- Suite room → Hotel room base: extends (evidence: `README.md`)
- Hotel room base → Room type: stores (evidence: `src/HotelRoom.java`)
- Hotel room base → Room status: tracks (evidence: `src/HotelRoom.java`)
- Standard room → Room type: sets type (evidence: `src/StandardRoom.java`)
- Deluxe room → Room type: sets type (evidence: `src/DeluxeRoom.java`)
- Suite room → Room type: sets type (evidence: `src/SuiteRoom.java`)
