Design pattern design program mode succinctly explain 2-4 UML class diagrams explaining comparison

1 main content

1.1 Comparison of relationships and dependencies

1.2 Comparative composition and polymeric

1.3 Comparison inheritance and implementation

 

 

1 main content

1.1 Comparison of relationships and dependencies

B is a class object associated with the presence of a class, the class has attributes penguins climate class

Dependence is a class member method has b class of property, animal metabolism method has properties of water and air, only the tone of this method when it may temporarily use it

 

1.2 Comparative composition and polymeric

Combination has the same life cycle, the birds have wings, the bird died, ceased to exist wings

Large geese geese, geese have been hung up, big geese will not go away

 

1.3 Comparison inheritance and implementation

The solid line: inheritance

Dotted line: to achieve

Guess you like

Origin www.cnblogs.com/1446358788-qq/p/10959064.html