input: Write a python function to calculate the mean and median of a list of numbers using a class.
  assert MeanMedianCalculator([1, 2, 3, 4, 5]).mean() == 3.0
  assert MeanMedianCalculator([1, 2, 3, 4, 5]).median() == 3
  assert MeanMedianCalculator([1, 1, 1, 1, 1, 1]).mean() == 1.0
  assert MeanMedianCalculator([1, 1, 1, 1, 1, 1]).median() == 1
  assert MeanMedianCalculator([5, 3, 1, 4, 2]).mean() == 3.0
  assert MeanMedianCalculator([5, 3, 1, 4, 2]).median() == 3
output: class MeanMedianCalculator:
      def __init__(self, numbers):
          self.numbers = numbers
  
      def mean(self):
          return sum(self.numbers) / len(self.numbers)
  
      def median(self):
          sorted_numbers = sorted(self.numbers)
          n = len(sorted_numbers)
          mid = n // 2
          if n % 2 == 0:
              return (sorted_numbers[mid - 1] + sorted_numbers[mid]) / 2.0
          else:
              return sorted_numbers[mid]