Q:
You are working on Microsoft Dynamics 365 finance and operations apps. You have been tasked with developing a new feature that requires the use of object-oriented programming.
You need to implement a solution that adheres to the principles of inheritance and abstraction, while ensuring optimal performance.
What three actions should you perform? Each correct answer presents a complete solution. Choose three.
-
A
Optimize the code by using the QueryBuilder class for database operations.
-
B
Create a base class with common properties and methods, and derive other classes from this base class.
-
C
Use abstract classes and interfaces to define common methods and properties.
-
D
A,B,C
D
Answer:
D
Explanation:
Wrong: Use global variables to share data between classes.
Wrong: Use direct database queries instead of the QueryBuilder class for all database operations.
Wrong: Implement all methods in a single class to simplify the code structure.
Inheritance and abstraction are key principles of object-oriented programming. Creating a base class and deriving other classes from it, as well as using abstract classes and interfaces, allows for code reuse and abstraction. The QueryBuilder class provides an efficient way to perform database operations. Global variables can lead to data inconsistency and should be avoided. Implementing all methods in a single class does not adhere to the principles of object-oriented programming. Direct database queries are less efficient than using the QueryBuilder class.
Identify relevant business concepts - Training | Microsoft Learn
Events and delegates - Finance & Operations | Dynamics 365 | Microsoft Learn
Related Topic:
Share Above MCQ