You can have a situation where two different classes are related, but there is no inheritance going on. This is referred to as composition -- where one class makes use of code contained in another class. For example, imagine we have a Package class which represents a software package. It contains attributes about the software package, like name, version, and size. We also have a Repository class which represents all the packages available for installation. While there’s no inheritance relationship between the two classes, they are related. The Repository class will contain a dictionary or list of Packages that are contained in the repository.
Christine Rafla
Email us at - techlaboffice77@gmail.com
En esta página del sitio puede ver el video en línea 56 Composition | Python [ COMPLETE COURSE ] de Duración hora minuto segunda en buena calidad , que subió el usuario Tech Lab 21 agosto 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 184 veces y le gustó 2 a los espectadores. Disfruta viendo!