A sophisticated backend system for museum database and tourist group management, featuring real-time event notifications between museums and tour guides. Built with Java using enterprise design patterns.
- Dynamic museum entity creation and management
- Location-based museum organisation
- Real-time event notifications system
- Comprehensive museum data handling
- Dynamic group creation and modification
- Professional guide assignment
- Member management with capacity controls
- Visit scheduling and coordination
- Java Development Kit (JDK) 17 or higher
- Gradle build tool (or use the included Gradle Wrapper)
- Clone the repository.
- If you prefer a global Gradle installation, download it from Gradle's official website.
- Build the project using the Gradle Wrapper:
./gradlew build # (Windows users can use gradlew.bat)
The test suite covers key functionality:
- Museum operations validation
- Group management scenarios
- Event notification testing
- Exception handling verification
To run tests:
./gradlew test # (Windows users can use gradlew.bat)
Important
For better visibility, run tests through IntelliJ IDEA’s sidebar instead of the terminal.
Tip
IntelliJ IDEA users can leverage the included Gradle Wrapper (gradle/wrapper
) for seamless integration:
- Automatic project recognition as a Gradle project
- Direct access to Gradle tasks via the sidebar
- No additional plugins or global Gradle installation required
Used for the Database
class to ensure a single source of truth:
- Prevents data inconsistency
- Provides centralized data access
Implemented for the Group
class:
- Enables flexible object construction
- Supports optional parameters
- Implements method chaining
- Improves code readability
Handles Person
object creation:
- Creates
Student
andProfessor
instances dynamically - Centralizes object creation logic
- Supports extensibility for new person types
Manages operations through dedicated command classes:
- Separates command invocation from execution
- Supports operation queuing
- Enables easy addition of new commands
Implements event notification system:
- Museums (
Subject
) notify groups guide (Observer
) - Real-time updates for schedule changes
- Decoupled communication between entities
- Encapsulation: Private fields with public accessors
- Inheritance: Base
Person
class with specialized extensions - Polymorphism: Dynamic object behavior through Factory Pattern
- Abstraction: Abstract classes and interfaces for clear separation
Custom exceptions for robust operation:
GroupNotExistsException
GroupThresholdException
GuideExistsException
GuideTypeException
PersonNotExistsException
- CSV-like file processing ('|' delimiter)
- Multiple input format support
- Command-based operation
- Standardized output formatting
If you find any bugs or have suggestions:
- Fork the repo and create a separate branch
- Ensure your contribution follows the OOP principles outlined
- Document any design pattern modifications
- Follow the existing code style and naming conventions
- Submit changes that maintain test compatibility
- Push the changes and create a pull request
This project is licensed under the MIT Licence. See the LICENCE file for further details.