✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Para cumplir el principio de sustitución de Liskov, siendo 'B' una subclase de 'A', en el siguiente caso
A ref = new B();
para que no se invoque un método de A que B no implementa, debemos sustituir la variable por un downcasting:
B ref2 = (B) ref;
y usar 'ref2' en vez de 'ref'.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!