56 Composition | Python [ COMPLETE COURSE ]

Veröffentlicht am: 21 August 2020
auf dem Kanal: 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


Auf dieser Seite können Sie das Online-Video 56 Composition | Python [ COMPLETE COURSE ] mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Tech Lab 21 August 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 184 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!