input: Write a function to calculate the roots of a quadratic equation.
  assert QuadraticEquation(1, -7, 12).getRoot1() == 4.0
  assert QuadraticEquation(1, -7, 12).getRoot2() == 3.0
  assert QuadraticEquation(1, 2, 1).getRoot1() == -1.0
  assert QuadraticEquation(1, 2, 1).getRoot2() == -1.0
  assert QuadraticEquation(1, 0, -1).getRoot1() == 1.0
  assert QuadraticEquation(1, 0, -1).getRoot2() == -1.0
output: import math
  
  class QuadraticEquation:
      def __init__(self, a, b, c):
          self.a = a
          self.b = b
          self.c = c
      
      def getDiscriminant(self):
          return self.b ** 2 - 4 * self.a * self.c
      
      def getRoot1(self):
          if self.getDiscriminant() < 0:
              return None
          return (-self.b + math.sqrt(self.getDiscriminant())) / (2 * self.a)
      
      def getRoot2(self):
          if self.getDiscriminant() < 0:
              return None
          return (-self.b - math.sqrt(self.getDiscriminant())) / (2 * self.a)