Unity Certified Professional Programmer Practice Questions - Unity Certified Professional Programmer Exam

Access More Questions
Your gameplay code has a tight coupling problem: a PlayerHealth class directly instantiates and references a concrete UIHealthBar class, making it impossible to test PlayerHealth without the UI. Which SOLID principle is most directly violated, and what is the standard fix?
Correct Answer:
Dependency Inversion Principle; depend on an interface (e.g., IHealthObserver) so high-level code does not depend on a concrete UI implementation

Access more questions from this quiz

Continue to Unity Certified Professional Programmer Practice Questions - Unity Certified Professional Programmer Exam for more practice questions and the full quiz experience.

Access More Questions