top of page

Reservation Management System 
Modular Backend Architecture with File-Based Persistence & Automated Testing

Executive Technical Summary

A standalone Java backend system for managing customer accounts and lodging reservations across multiple property types. The system emphasizes strict domain validation, controlled state transitions, file-based persistence, and comprehensive automated testing. Designed for correctness, maintainability, and future extensibility into full-stack or distributed architectures.

​  

Key Focus Areas: modular architecture, domain-driven design, validation-first logic, and testable backend systems.

System Architecture Overview

The system follows a layered, object-oriented architecture that cleanly separates orchestration, domain logic, persistence, and error handling.

Architecture layers:

  • External UI (Conceptual): Delegates all business logic and validation to the backend

  • Manager Layer: Public API and orchestration of system operations

  • Domain Layer: Account and Reservation models with embedded validation

  • Persistence Layer: Structured file-based storage and retrieval

  • Exception System: Domain-specific, fail-fast error handling

This structure enables future UI integration and database migration without refactoring core business logic.

Repository Structure

The repository follows a modular, Maven-standard layout that separates domain models, application coordination, persistence, validation, and user interaction. This structure reinforces clear ownership of responsibilities and supports maintainable backend development by preventing UI and storage concerns from leaking into core business logic.

 

reservation-management-system/

├── src/

│   ├── main/

│   │   └── java/

│   │       ├── reservation/        # Reservation domain models

│   │       ├── customer/           # Customer entities

│   │       ├── manager/            # Reservation and customer managers

│   │       ├── exception/          # Custom exception hierarchy

│   │       ├── persistence/        # File-based load/save logic

│   │       └── ui/                 # CLI interaction layer

│   └── test/

│       └── java/                   # JUnit tests

├── data/                           # Reservation and customer data files

├── README.md

└── pom.xml

Core Design Decisions & Rationale

File-Based Persistence Model

A database was intentionally excluded to remain within project constraints and highlight architectural separation.

Rationale:

  • Human-readable structured data

  • Clear separation between business logic and storage

  • Compatible with future database migration

Trade-offs:

  • No concurrency or transactional guarantees

  • Single-user execution model

​   

Custom Exception Hierarchy

Rather than relying on generic runtime exceptions, the system defines domain-specific errors.

Examples include:

  • IllegalParameter_Exception

  • IllegalOperation_Exception

  • IllegalLoad_Exception

  • IllegalSave_Exception

  • NullAccount_Exception

  • NullReservation_Exception

  • IllegalState_Exception

  • DuplicateObject_Exception

This ensures invalid inputs, illegal state transitions, and persistence failures are surfaced immediately.​​

Domain Model & State Logic

Reservation Inheritance Structure

Each lodging type extends a shared abstract Reservation base class:

  • HotelReservation — kitchenette fee logic

  • CabinReservation — loft and kitchen adjustments

  • HouseReservation — multi-floor considerations

This demonstrates polymorphism, shared behavior encapsulation, and type-specific overrides.

   ​

Controlled State Transitions

Reservations move only through valid lifecycle states:

  • DRAFT → COMPLETED

  • DRAFT → CANCELLED

  • COMPLETED / CANCELLED → (no further transitions)

Invalid transitions are blocked at the domain level, ensuring historical accuracy and business rule compliance.

Validation & Data Integrity Strategy

Validation is enforced directly within constructors and setters:

  • Non-empty required fields

  • Valid addresses and parameters

  • Immutable identity fields (account number, reservation ID)

All validation failures raise domain-specific exceptions, enforcing a fail-fast design philosophy.

Testing Strategy

The project includes a comprehensive JUnit 5 test suite covering:

  • Account creation, lookup, and modification

  • Reservation lifecycle operations

  • Pricing and cost calculations

  • Exception handling and invalid operations

  • Manager-level orchestration logic

   

Representative test classes:

  • AccountTest

  • ReservationTest

  • UpdateReservationTest

  • FindReservationTest

  • TestManager

Tools & Technologies

  • Language: Java

  • Testing: JUnit 5

  • Persistence: Structured XML-like text files

  • Modeling: UML (StarUML)

  • Runtime: Standard Java (no external frameworks)

Outcome & Engineering Takeaways

Engineering Capabilities Demonstrated

  • End-to-end backend system design from formal requirements

  • Architectural decomposition and clean OOP modeling

  • Domain validation and custom exception engineering

  • State machine enforcement and lifecycle management

  • Automated testing for correctness and robustness

System Qualities Achieved

  • Maintainability: modular design and clear boundaries

  • Reliability: strict validation and controlled state transitions

  • Extensibility: easy addition of new reservation types

  • Testability: comprehensive automated test coverage

bottom of page