6. Software Engineering

Design Principles — Quiz

Test your understanding of design principles with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

Which UML diagram shows a snapshot of instances (objects) in a system at a particular moment, including their relationships?

Question 2

Which type of cohesion is exhibited when elements of a module are grouped because they are activated at the same phase of execution, such as initialization or shutdown routines?

Question 3

Which programming principle advises developers to not implement functionality until it is actually required, thereby avoiding speculative generality?

Question 4

Which design principle, often summarized as 'talk only to your immediate friends', advises that a module should only call methods of closely related modules and not chain calls through intermediate objects?

Question 5

Which design principle recommends using object composition rather than class inheritance to achieve code reuse and flexibility?