- Hands-On Penetration Testing with Python
- Furqan Khan
- 70字
- 2021-07-02 14:13:58
Composition
Composition in OOP represents the part of relationship between classes. In this relationship, one class is a part of another class. Let's consider the following example, Composition.py, to understand the composition relationship between classes:

In the preceding example, the relation between the Ferrari car and the engine is of composition type. This is because the engine is part of the car, which is of the Ferrari type.
推薦閱讀
- Oracle從入門到精通(第3版)
- 軟件界面交互設(shè)計(jì)基礎(chǔ)
- C# Programming Cookbook
- C++ Builder 6.0下OpenGL編程技術(shù)
- SQL for Data Analytics
- Data Analysis with IBM SPSS Statistics
- Koa開發(fā):入門、進(jìn)階與實(shí)戰(zhàn)
- Learning Laravel 4 Application Development
- 精通Scrapy網(wǎng)絡(luò)爬蟲
- PySide GUI Application Development(Second Edition)
- C#程序設(shè)計(jì)
- jQuery炫酷應(yīng)用實(shí)例集錦
- Python+Tableau數(shù)據(jù)可視化之美
- Pandas 1.x Cookbook
- C語言程序設(shè)計(jì)