<\/div>\n
<\/p>\n\n- class<\/font><\/span> Animal{} <\/strong><\/span><\/span> <\/strong><\/li>\n
- class<\/font><\/span> Tiger <\/span>extends<\/font><\/span> Animal{} <\/span> <\/strong><\/span><\/li>\n
- public<\/font><\/span> <\/span>class<\/font><\/span> Test <\/span> <\/strong><\/span><\/li>\n
- { <\/span> <\/strong><\/li>\n
- <\/span>public<\/font><\/span> <\/span>void<\/font><\/span> test() <\/span> <\/strong><\/li>\n
- { <\/span> <\/strong><\/li>\n
- Animal a=<\/span>new<\/font><\/span> Tiger(); <\/span> <\/strong><\/li>\n
- } <\/span> <\/strong><\/li>\n
- } <\/span> <\/strong><\/li>\n<\/ol>\n
<\/strong><\/div>\n
2.\u4f9d\u8d56(Dependency)<\/font>
<\/strong>[\u4f9d\u8d56]
<\/strong><\/font>\u5bf9\u4e8e\u4e24\u4e2a\u76f8\u5bf9\u72ec\u7acb\u7684\u5bf9\u8c61\uff0c\u5f53\u4e00\u4e2a\u5bf9\u8c61\u8d1f\u8d23\u6784\u9020\u53e6\u4e00\u4e2a\u5bf9\u8c61\u7684\u5b9e\u4f8b\uff0c\u6216\u8005\u4f9d\u8d56\u53e6\u4e00\u4e2a\u5bf9\u8c61\u7684\u670d\u52a1\u65f6\uff0c\u8fd9\u4e24\u4e2a\u5bf9\u8c61\u4e4b\u95f4\u4e3b\u8981\u4f53\u73b0\u4e3a\u4f9d\u8d56\u5173\u7cfb\u3002
[\u5177\u4f53\u8868\u73b0]
<\/strong><\/font>\u4f9d\u8d56\u5173\u7cfb\u8868\u73b0\u5728\u5c40\u90e8\u53d8\u91cf<\/font>\uff0c\u65b9\u6cd5\u7684\u53c2\u6570<\/font>\uff0c\u4ee5\u53ca\u5bf9\u9759\u6001\u65b9\u6cd5\u7684\u8c03\u7528<\/font>
[\u73b0\u5b9e\u4f8b\u5b50]
<\/strong><\/font>\u6bd4\u5982\u8bf4\u4f60\u8981\u53bb\u62e7\u87ba\u4e1d\uff0c\u4f60\u662f\u4e0d\u662f\u8981\u501f\u52a9(\u4e5f\u5c31\u662f\u4f9d\u8d56)\u87ba\u4e1d\u5200(Screwdriver)\u6765\u5e2e\u52a9\u4f60\u5b8c\u6210\u62e7\u87ba\u4e1d(screw)\u7684\u5de5\u4f5c
[UML\u8868\u73b0](\u56fe1.2)<\/strong><\/font>
<\/font>(4)\u805a\u5408\uff08Aggregation\uff09<\/font>
[\u805a\u5408]
<\/font><\/strong>\u5f53\u5bf9\u8c61A\u88ab\u52a0\u5165\u5230\u5bf9\u8c61B\u4e2d\uff0c\u6210\u4e3a\u5bf9\u8c61B\u7684\u7ec4\u6210\u90e8\u5206\u65f6\uff0c\u5bf9\u8c61B\u548c\u5bf9\u8c61A\u4e4b\u95f4\u4e3a\u805a\u96c6\u5173\u7cfb\u3002\u805a\u5408\u662f\u5173\u8054\u5173\u7cfb\u7684\u4e00\u79cd\uff0c\u662f\u8f83\u5f3a\u7684\u5173\u8054\u5173\u7cfb\uff0c\u5f3a\u8c03\u7684\u662f\u6574\u4f53<\/font>\u4e0e\u90e8\u5206<\/font>\u4e4b\u95f4\u7684\u5173\u7cfb\u3002
[\u5177\u4f53\u8868\u73b0]
<\/strong><\/font>\u4e0e\u5173\u8054\u5173\u7cfb\u4e00\u6837\uff0c\u805a\u5408\u5173\u7cfb\u4e5f\u662f\u901a\u8fc7\u5b9e\u4f8b\u53d8\u91cf<\/font>\u6765\u5b9e\u73b0\u8fd9\u6837\u5173\u7cfb\u7684\u3002\u5173\u8054\u5173\u7cfb\u548c\u805a\u5408\u5173\u7cfb\u6765\u8bed\u6cd5\u4e0a\u662f\u6ca1\u529e\u6cd5\u533a\u5206\u7684\uff0c\u4ece\u8bed\u4e49<\/font>\u4e0a\u624d\u80fd\u66f4\u597d\u7684\u533a\u5206<\/font>\u4e24\u8005\u7684\u533a\u522b\u3002
[\u5173\u8054\u4e0e\u805a\u5408\u7684\u533a\u522b]<\/strong><\/font>
(1)\u5173\u8054\u5173\u7cfb\u6240\u6d89\u53ca\u7684\u4e24\u4e2a\u5bf9\u8c61\u662f\u5904\u5728\u540c\u4e00\u4e2a\u5c42\u6b21\u4e0a\u7684\u3002\u6bd4\u5982\u4eba\u548c\u81ea\u884c\u8f66\u5c31\u662f\u4e00\u79cd\u5173\u8054\u5173\u7cfb\uff0c\u800c\u4e0d\u662f\u805a\u5408\u5173\u7cfb\uff0c\u56e0\u4e3a\u4eba\u4e0d\u662f\u7531\u81ea\u884c\u8f66\u7ec4\u6210\u7684\u3002
\u805a\u5408\u5173\u7cfb\u6d89\u53ca\u7684\u4e24\u4e2a\u5bf9\u8c61\u5904\u4e8e\u4e0d\u5e73\u7b49\u7684\u5c42\u6b21\u4e0a\uff0c\u4e00\u4e2a\u4ee3\u8868\u6574\u4f53\uff0c\u4e00\u4e2a\u4ee3\u8868\u90e8\u5206\u3002\u6bd4\u5982\u7535\u8111\u548c\u5b83\u7684\u663e\u793a\u5668\u3001\u952e\u76d8\u3001\u4e3b\u677f\u4ee5\u53ca\u5185\u5b58\u5c31\u662f\u805a\u96c6\u5173\u7cfb\uff0c\u56e0\u4e3a\u4e3b\u677f\u662f\u7535\u8111\u7684\u7ec4\u6210\u90e8\u5206\u3002
(2)\u5bf9\u4e8e\u5177\u6709\u805a\u96c6\u5173\u7cfb\uff08\u5c24\u5176\u662f\u5f3a\u805a\u96c6\u5173\u7cfb\uff09\u7684\u4e24\u4e2a\u5bf9\u8c61\uff0c\u6574\u4f53\u5bf9\u8c61\u4f1a\u5236\u7ea6\u5b83\u7684\u7ec4\u6210\u5bf9\u8c61\u7684\u751f\u547d\u5468\u671f\u3002\u90e8\u5206\u7c7b\u7684\u5bf9\u8c61\u4e0d\u80fd\u5355\u72ec\u5b58\u5728\uff0c\u5b83\u7684\u751f\u547d\u5468\u671f\u4f9d\u8d56\u4e8e\u6574\u4f53\u7c7b\u7684\u5bf9\u8c61\u7684\u751f\u547d\u5468\u671f\uff0c\u5f53\u6574\u4f53\u6d88\u5931\uff0c\u90e8\u5206\u4e5f\u5c31\u968f\u4e4b\u6d88\u5931\u3002\u6bd4\u5982\u5f20\u4e09\u7684\u7535\u8111\u88ab\u5077\u4e86\uff0c\u90a3\u4e48\u7535\u8111\u7684\u6240\u6709\u7ec4\u4ef6\u4e5f\u4e0d\u5b58\u5728\u4e86\uff0c\u9664\u975e\u5f20\u4e09\u4e8b\u5148\u628a\u4e00\u4e9b\u7535\u8111\u7684\u7ec4\u4ef6\uff08\u6bd4\u5982\u786c\u76d8\u548c\u5185\u5b58\uff09\u62c6\u4e86\u4e0b\u6765\u3002
[UML\u56fe](\u56fe1.4)<\/strong><\/font>

<\/span>
\u56fe1.3 <\/font>\u7535\u8111\u548c\u7ec4\u4ef6\u7684\u805a\u5408\u5173\u7cfb<\/font><\/strong><\/font><\/p>\n[\u4ee3\u7801\u8868\u73b0]<\/strong><\/font><\/font><\/strong> <\/font><\/strong><\/strong><\/strong><\/p>\n\n

<\/span>
\u56fe1.2 <\/font>Person\u7c7b\u4e0eScrewdriver\u7c7b\u7684\u4f9d\u8d56\u5173\u7cfb<\/strong>
[\u4ee3\u7801\u8868\u73b0] <\/strong><\/font><\/font><\/font><\/p>\n\n
<\/div>\n
<\/p>\n\n- public<\/font><\/span> <\/span>class<\/font><\/span> Person{ <\/span><\/strong><\/span> <\/strong><\/li>\n
- <\/span>