Question: Class BB inherits from class AA. BB uses a different method to calculate the price. As shown, the code does not compile. What changes is needed to resolve the compilation error?

  1. You need to add a lateinit modifier to `AA.price`.
  2. You simply need to add an override modifier to `BB.price`.
  3. You need to add an open modifier to `AA.price` and an override modifier to `BB.price`.
  4. You need to add a public modifier to `AA.price` and a protected modifier to `BB.price`.

Answer: The correct answer of the above question is Option C:You need to add an open modifier to `AA.price` and an override modifier to `BB.price`.