exam(elaborations)Polymorphism and Abstract Classes in java
1. Explain the difference between the terms late binding and polymorphism . 2 . Suppose you modify the definitions of the class Sale ( Display 8.1 ) by adding the modifier final to the definition of the method bill . How would that change the output of the program in Display 8.3 ? 3. Would it be legal to add the following method definition to the class DiscountSale ? public static boolean isAGoodBuy(Sale theSale) { return (theSDiscount() 20); }
Información del documento
- Subido en
- 7 de febrero de 2023
- Número de páginas
- 7
- Escrito en
- 2022/2023
- Tipo
- Examen
- Contiene
- Preguntas y respuestas