- Hands-On Penetration Testing with Python
- Furqan Khan
- 104字
- 2021-07-02 14:13:58
Association
The association relationship maintains a has a kind of relationship between the objects of the classes. The has a relation can either be one-to-one or one-to-many. In the following example, we can see that there is a one-to-one association relationship between the Employee and Manager classes, as an Employee would only have one Manager class. We also have a one-to-one association relation between Employee and Department. The reverse of these relationships would be one-to-many relationships as one Department class might have many employees and one manager might have many employees reporting to them. The following code snippet depicts the association relationship:

推薦閱讀
- Mastering Concurrency Programming with Java 8
- Vue.js設(shè)計(jì)與實(shí)現(xiàn)
- Azure IoT Development Cookbook
- PaaS程序設(shè)計(jì)
- 從0到1:HTML+CSS快速上手
- JavaScript從入門到精通(第3版)
- Learning AndEngine
- Python數(shù)據(jù)分析從0到1
- 可解釋機(jī)器學(xué)習(xí):模型、方法與實(shí)踐
- Python數(shù)據(jù)結(jié)構(gòu)與算法(視頻教學(xué)版)
- SQL Server實(shí)用教程(SQL Server 2008版)
- HTML5開發(fā)精要與實(shí)例詳解
- Scratch·愛編程的藝術(shù)家
- Django 5企業(yè)級Web應(yīng)用開發(fā)實(shí)戰(zhàn)(視頻教學(xué)版)
- 零基礎(chǔ)學(xué)HTML+CSS