56 Composition | Python [ COMPLETE COURSE ]

Published: 21 August 2020
on channel: 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


On this page of the site you can watch the video online 56 Composition | Python [ COMPLETE COURSE ] with a duration of hours minute second in good quality, which was uploaded by the user Tech Lab 21 August 2020, share the link with friends and acquaintances, this video has already been watched 184 times on youtube and it was liked by 2 viewers. Enjoy your viewing!