← Quiz: SOLID Principles: all 10 questions
Quiz: SOLID Principles · Question 9 of 10
Which statement about DRY is correct?
Which statement about DRY is correct?
- A.Each piece of knowledge, such as a tax rate, should be defined in one place
- B.Never write two functions with the same number of lines
- C.Copy code instead of calling functions, to avoid coupling
- D.DRY means writing no comments
Answer & explanation
Correct answer: Each piece of knowledge, such as a tax rate, should be defined in one place
If the rate changes, only one place needs editing.
Can you get the rest right without peeking?
Take the timed Quiz: SOLID Principles quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →