Table of Contents
Question
You are developing a custom module in Microsoft Dynamics 365 finance and operations apps that requires using object-oriented principles to manage financial transactions.
You need to ensure that the module supports different types of transactions while sharing common functionalities and adhering to the principle of inheritance.
You need to design the classes appropriately.
How should you do this?
Select only one answer.
A. Create separate classes for each transaction type without a base class and replicate the common functionalities.
B. Create a base class for common transaction functionalities and derive specialized classes for each transaction type.
C. Use a standalone utility class that handles all types of transactions with conditional statements.
D. Implement all transaction types within a single class to centralize the transaction management.
Answer
B. Create a base class for common transaction functionalities and derive specialized classes for each transaction type.
Explanation
Option A is correct because it uses inheritance to share common functionalities among different transaction types. Option B is incorrect as it violates the single responsibility principle and does not use inheritance. Option C is incorrect because it does not leverage the benefits of object-oriented design such as inheritance. Option D is incorrect as it leads to code duplication and does not use inheritance.
Microsoft Dynamics 365: Finance and Operations Apps Developer MB-500 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Dynamics 365: Finance and Operations Apps Developer MB-500 exam and earn Microsoft Dynamics 365: Finance and Operations Apps Developer MB-500 certification.