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); }
Documentinformatie
- Geüpload op
- 7 februari 2023
- Aantal pagina's
- 7
- Geschreven in
- 2022/2023
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden