56 Composition | Python [ COMPLETE COURSE ]

Pubblicato il: 21 agosto 2020
sul canale di: 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


In questa pagina del sito puoi guardare il video online 56 Composition | Python [ COMPLETE COURSE ] della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Tech Lab 21 agosto 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 184 volte e gli è piaciuto 2 spettatori. Buona visione!