logo

AQA A-Level Computer Science practice

Which design principle recommends using composition instead of inheritance where appropriate?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Programming paradigms

Exam-style question

Try this first

Which design principle recommends using composition instead of inheritance where appropriate?.

  1. A.Encapsulate what varies
  2. B.Favour composition over inheritance
  3. C.Program to interfaces, not implementation
  4. D.Make every attribute public

Answer and explanation

Concise answer

Favour composition over inheritance

Why this is correct

The specification lists favour composition over inheritance as an object-oriented design principle.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions