Implement the validateBookingCapacity method that checks whether a booking request fits within the available capacity.

The input contains three integers: booked, requested, and capacity. These values represent the number of already booked seats, the number of new seats requested, and the total available capacity.

Your task is to check whether the new booking can be accepted without crossing the total capacity.

For example, if booked = 8, requested = 2, and capacity = 10, the booking is valid because the final total is exactly 10.

Example 1
Input:
booked (int) = 8
requested (int) = 2
capacity (int) = 10
Return:
(boolean) true
Example 2
Input:
booked (int) = 8
requested (int) = 3
capacity (int) = 10
Return:
(boolean) false
Example 3
Input:
booked (int) = 0
requested (int) = 5
capacity (int) = 5
Return:
(boolean) true

Add the already booked count and the requested count.

If this total is less than or equal to the capacity, the booking can be accepted. If the total is greater than the capacity, accepting the booking would overfill the available limit.

This problem only needs a direct condition check because there is no need to loop through any collection.

Pseudocode:

function validateBookingCapacity(booked, requested, capacity):
    total = booked + requested
    if total <= capacity:
        return true
    return false
Run your code to see the result.