类图关系大全.pptxVIP

  • 5
  • 0
  • 约4.43千字
  • 约 25页
  • 2020-05-27 发布于上海
  • 举报
UML类图关系大全Association in class diagrams/riky/archive/2007/04/07/704298.html/riky/archive/2007/04/07/704298.html课本: 软件工程张海藩 编著人民邮电出版社 图书馆编号: TP311.5 Z111“is a” relationship泛化(Generalization) 类与类的继承关系,类与接口的实现关系。场景:父与子、动物与人、植物与树、系统使用者与B2C会员和B2E会员的关系系统的使用者包括:B2C会员、B2B会员和B2E会员。他们都是系统使用者。类与类之间的泛化图//has-a relationshipPizza is a food. A Pizza has ingredients, tomato, pepper, mushroom, … a cost, and a price. public class Pizza extends Food { //is-a relationshipint ingredients; Tomato t;Peper p;Mushroom m;double cost; double price; .... } 汽车是一种交通工具:汽车is-a交通工具 汽车有一个发动机:汽车has-a发动机 is-a一般是继承关系 has-a一般是组

文档评论(0)

1亿VIP精品文档

相关文档