Heritage (data-processing)
The heritage is a principle of the directed Programmation object, allowing amongst other things the reutilisability and the adaptability of the Objet S. It is named thus because the principle is to some extent the same one as that of a Family tree. This principle is based on class S of which " filles" inherits the characteristics of their " mother (S) ".
The classes have attributes and/or methods which theirs are clean, and which could be transmitted to the classes girls rising from the classes mothers.
Each class girls can thus have the same characteristics as its classes mothers and profit from additional characteristics to those of these classes mothers. Each class girl can, if the programmer did not define a limitation, become in her turn classifies mother.
Examples
Java
animal public class { String name;
animal public {}; public modifierNom (String newNom) {}; }
public class Animal Cat extends { public Cat {}; public miauler {}; }
public class Animal Dog extends { public Dog {}; public to bark {}; }
/* Utilization of the classes*/
Dog toutou=new Dog (" Rex"); toutou.aboyer (); // method of the class toutou.modifierNom (" Isidor"); //m éthode inherited
See too
- directed Programming multiple object
- Heritage
Simple: Inheritance (computer science)
| Random links: | Route European 14 | Ptyodactylus homolepis | Cliff Potts | TPOK Jazz | Investor AB | Registre_interne |