"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-05 23:09:04.060761
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing a function with a fallback mechanism in case of errors.
    
    Attributes:
        executor (Callable): The primary function to be executed.
        fallback (Callable): The backup function used when the primary fails.
    """
    
    def __init__(self, executor: Callable, fallback: Callable):
        self.executor = executor
        self.fallback = fallback
    
    def execute_with_fallback(self) -> Any:
        """
        Attempts to execute the primary function. If an exception occurs,
        the backup function is called instead.
        
        Returns:
            The result of the executed function or its fallback.
        """
        try:
            return self.executor()
        except Exception as e:
            print(f"An error occurred: {e}")
            return self.fallback()


def primary_function() -> int:
    """Divides 10 by 2 and returns the result."""
    return 10 / 2


def fallback_function() -> int:
    """Returns a default value of 5 when primary function fails."""
    return 5


# Example usage
if __name__ == "__main__":
    executor = FallbackExecutor(executor=primary_function, fallback=fallback_function)
    
    result = executor.execute_with_fallback()
    print(f"Result: {result}")  # Expected output: Result: 5.0

    try:
        primary_function()  # This line will raise a ZeroDivisionError if modified
    except Exception as e:
        print(e)

    fallback_result = executor.execute_with_fallback()
    print(f"Fallback result: {fallback_result}")  # Expected output: Fallback result: 5.0
```