Question: Why is inheritance used when creating a new class?

  1. to protect attributes from unwanted changes
  2. to delegate coding responsibility more efficiently
  3. to conserve memory
  4. to avoid writing duplicate code

Answer: The correct answer of the above question is Option E:to separate class behavior from the more general