A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class. Which is the correct implementation? A. B. C. D.
If you were making the method in CreditCardPayment virtual you would also need to make the class virtual, otherwise any other class extending it would not be able to extend e.g. you still also need to use the override keyword in CreditCardPayment in order for it to work...
public virtual class Payment {
public virtual void makePayment(Decimal amount){
}
}
public virtual class CreditCardPayment extends Payment{
public virtual override void makePayment(Decimal amount){
}
}
public class RevolutPayment extends CreditCardPayment {
public override void makePayment(Decimal amount){
}
}
upvoted 3 times
...
...
This section is not available anymore. Please use the main Exam Page.CRT-450 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
1vanTT
5 months agoDonAldos
2 years agosirerick
2 years, 1 month ago1vanTT
5 months ago