(質問全文) 開発者は、既存の Payment クラスの実装を提供する CreditCardPayment クラスを作成する必要があります。 public virtual class Payment { public virtual void makePayment(Decimal amount) { // implementation } } Which is the correct implementation?
正解:D
Comprehensive and Detailed Explanation From Exact Extract: * D (Correct):Since Payment is avirtual class, it can beextended(not implemented like an interface), and its makePayment method is also virtual, which allows it to be overridden using the override keyword. The use of override is required to redefine a virtual or abstract method from the parent class. Reference:Apex Developer Guide - Inheritance and Polymorphism This maps to"Developer Fundamentals"in the PD1 exam, specifically aroundobject-oriented programming principles.