i have a code. How replace inheritance with delegation:
abstract class Dog { void bark(); void eat(); } class Shpitz extends Dog { void bark(); void eat(); } class DauchSpitz extends Dog { void bark(); void eat();}
Aucun commentaire:
Enregistrer un commentaire