MCQ PracticeSingle Best AnswerTopic: ICSE Computer Application - Class X - Selection Examination - 2024-25 - MCQ - CALCUTTA PUBLIC SCHOOL
Q
What is the main advantage of using inheritance in object-oriented programming?
Question ID
#23892
Subchapter
ICSE Computer Application - Class X - Selection Examination - 2024-25 - MCQ - CALCUTTA PUBLIC SCHOOL
Action
Choose one option below
Choose Your Answer
Click an option to check whether your answer is correct.
A
Reducing code duplication and promoting code reusability. ✔✖
B
Hiding implementation details. ✔✖
C
Making all members private. ✔✖
D
Enabling polymorphism. ✔✖
A
Correct Answer: A
Explanation
Explanation:
Inheritance allows a child class to acquire properties and methods from a parent class, eliminating the need to duplicate code. This promotes code reusability and simplifies maintenance.