Q
You are working on a project that involves the development of a new class in X++ for Microsoft Dynamics 365 finance and operations apps.
You need to create a subclass that extends an existing superclass and overrides one of its methods to customize its behavior.
What three steps should you perform? Each correct answer presents part of the solution. Choose three.
Question Info
Choose the Best Option
Click any option to instantly check if you're correct.
Explanation
Wrong: Use the 'final' keyword when declaring the subclass to prevent further inheritance.
Wrong: Declare the method to be overridden in the subclass as 'private'.
Wrong: Use the 'overload' keyword to change the functionality of the inherited method.
To create a subclass that extends a superclass, you need to create a new class and use the 'extends' keyword to specify the superclass it should inherit from. To override a method from the superclass, you need to declare a method with the same name and parameters in the subclass and add the desired functionality. Using the 'final' keyword when declaring the subclass would prevent further inheritance, which is not required in this scenario. Declaring the method to be overridden as 'private' would make it inaccessible from the subclass. The 'overload' keyword does not exist in X++, so it cannot be used to change the functionality of the inherited method.
X++ inheritance - Finance & Operations | Dynamics 365 | Microsoft Learn
Add code and methods to meet business requirements - Training | Microsoft Learn
Want to remember what you got wrong?
Create a free account in seconds to track your score, revisit mistakes and continue X++ Programming Language where you left off.
- Save your progress & streak
- Topic-wise quizzes & scores
- Bookmark tricky questions
- Printable MCQ sets
Nice — 3 questions done!
Don't lose this streak. Sign up free to save your score and pick up exactly where you stopped.
Share This Question
Challenge a friend or share with your study group.