56 Composition | Python [ COMPLETE COURSE ]

Publicado em: 21 Agosto 2020
no canal de: Tech Lab
184
2

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


Nesta página do site você pode assistir ao vídeo on-line 56 Composition | Python [ COMPLETE COURSE ] duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Tech Lab 21 Agosto 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 184 vezes e gostou 2 espectadores. Boa visualização!