Microsoft
70-354 · Question #48
You are developing a Universal Windows Platform (UWP) app. The app has a custom class named Auditing that is used to track actions that users perform in the app. You implement auditing for many method
The correct answer is A. Refactor the Auditing class by using the Observer pattern.. See the full explanation below for the reasoning.
Question
You are developing a Universal Windows Platform (UWP) app. The app has a custom class named Auditing that is used to track actions that users perform in the app. You implement auditing for many methods throughout the app. You need to configure the auditing process to meet the following requirements: * You must use a custom attribute to disable auditing for specific methods during automated testing of the app. * During the automated testing, you must redirect auditing output. You must use a custom attribute to disable auditing for specific methods during automated testing of the app. During the automated testing, you must redirect auditing output. What should you do?
Options
- ARefactor the Auditing class by using the Observer pattern.
- BCreate a new audit interface and implement two different versions of the Auditing class.
- CRefactor the Auditing class by using the Decorator pattern.
- DCreate a new audit interface and implement different versions of the Auditing class for every method that uses the Auditing class.
How the community answered
(26 responses)- A81% (21)
- B4% (1)
- C4% (1)
- D12% (3)
Community Discussion
No community discussion yet for this question.