input: Write a function to create an object-oriented structure in Python to solve a maze. The function should include a Maze class with methods to initialize the maze, solve it, and find the path. If a path is found, the function should return the number of steps taken to reach the end. If there's no path, it should return None.
  assert Maze(3, 3).solve_maze() == None
  assert Maze(4, 4).solve_maze() == [15]
  assert Maze(2, 2).solve_maze() == [3]
  assert Maze(1, 1).solve_maze() == [0]
  assert Maze(0, 0).solve_maze() == None
output: class Maze:
      def __init__(self, rows, cols):
          self.rows = rows
          self.cols = cols
          self.maze = [[0 for _ in range(cols)] for _ in range(rows)]
          self.start = (0, 0)
          self.end = (rows - 1, cols - 1)
  
      def solve_maze(self):
          if self.rows == 0 or self.cols == 0:
              return None
          queue = [(self.start, 0)]
          visited = set()
          directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]
          while queue:
              (current_row, current_col), steps = queue.pop(0)
              if (current_row, current_col) == self.end:
                  return steps
              if (current_row, current_col) not in visited:
                  visited.add((current_row, current_col))
                  for dr, dc in directions:
                      new_row, new_col = current_row + dr, current_col + dc
                      if 0 <= new_row < self.rows and 0 <= new_col < self.cols:
                          queue.append(((new_row, new_col), steps + 1))
          return None