Skip to content

Commit 9a0b9f9

Browse files
authored
changed files by pdets auto publish service, publishid[14aba846-7e43-4e4e-97c3-c56107004a71] and do [publish].
1 parent c75177d commit 9a0b9f9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

learn-pr/wwl-azure/design-resilient-code-interfaces/8-knowledge-check.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,34 @@ quiz:
2929
explanation: "Correct. Interfaces define a set of methods and properties that implementing classes must provide, promoting loose coupling and making the code easier to test and maintain."
3030
- content: "How can the issue of tightly coupled code be addressed?"
3131
choices:
32-
- content: "By modifying existing code to add new features"
32+
- content: "By modifying existing code to add new features."
3333
isCorrect: false
3434
explanation: "Incorrect. Modifying existing code to add new features violates the Open/Closed Principle."
35-
- content: "By refactoring the code using interfaces to make it more modular and flexible"
35+
- content: "By refactoring the code using interfaces to make it more modular and flexible."
3636
isCorrect: true
3737
explanation: "Correct. Using interfaces to decouple components can make the code more modular and flexible, addressing the issue of tightly coupled code."
38-
- content: "By increasing dependencies between components"
38+
- content: "By increasing dependencies between components."
3939
isCorrect: false
4040
explanation: "Incorrect. Increasing dependencies would lead to more tightly coupled code, not less."
4141
- content: "What is the main advantage of using an interface in programming?"
4242
choices:
43-
- content: "It allows to modify the class without adding new type items"
43+
- content: "It allows you to modify the class without adding new type items."
4444
isCorrect: false
4545
explanation: "Incorrect. An interface does not allow modification of the class, but it does allow adding new type items without modifying the class."
46-
- content: "It makes the system more complex and difficult to understand"
46+
- content: "It makes the system more complex and difficult to understand."
4747
isCorrect: false
4848
explanation: "Incorrect. An interface actually simplifies maintenance by making the system easier to understand, test, and extend."
49-
- content: "It isolates behavior, ensuring the class doesn't depend on specific implementations"
49+
- content: "It isolates behavior, ensuring the class doesn't depend on specific implementations."
5050
isCorrect: true
5151
explanation: "Correct. An interface sets a contract for behavior without detailing its implementation, thus reducing dependencies and improving modularity."
5252
- content: "How does an interface contribute to the principle of Separation of Concerns?"
5353
choices:
54-
- content: "By isolating behavior and ensuring responsibilities are clearly divided"
54+
- content: "By isolating behavior and ensuring responsibilities are clearly divided."
5555
isCorrect: true
5656
explanation: "Correct. An interface isolates behavior, which aligns with the principle of Separation of Concerns by ensuring responsibilities are clearly divided."
57-
- content: "By complicating the system's understanding, testing, and extension"
57+
- content: "By complicating the system's understanding, testing, and extension."
5858
isCorrect: false
5959
explanation: "Incorrect. An interface simplifies maintenance by clearly dividing responsibilities."
60-
- content: "By allowing the class to depend on specific implementations"
60+
- content: "By allowing the class to depend on specific implementations."
6161
isCorrect: false
6262
explanation: "Incorrect. An interface actually ensures that the class doesn't depend on specific implementations."

0 commit comments

Comments
 (0)