input: Write a python function to perform binary search in a sorted array.
  assert BinarySearch([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).search(5) == 4
  assert BinarySearch([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]).search(70) == 6
  assert BinarySearch([5, 10, 15, 20, 25, 30]).search(15) == 2
  assert BinarySearch([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).search(11) == -1
output: class BinarySearch:
      def __init__(self, array):
          self.array = array
      
      def search(self, target):
          left, right = 0, len(self.array) - 1
          while left <= right:
              mid = (left + right) // 2
              if self.array[mid] == target:
                  return mid
              elif self.array[mid] < target:
                  left = mid + 1
              else:
                  right = mid - 1
          return -1