Tải bản đầy đủ (.pdf) (12 trang)

Software design: Lecture 17 - Sheraz Pervaiz

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (329.33 KB, 12 trang )

1

Software Design

Lecture : 17


2

Relationships between Classes
Ø

Association

Ø

Aggregation

Ø

Composition

Ø

Inheritance


3

Association
Ø



It represents a linkage between two classes.

Ø

Associations are bi­directional i­e both classes are 
involved in a relationship

Ø

  The  line  is  drawn  from  the  containing  to  the 


4

Association Example


5

Multiplicity
Ø

Identify how many instance of a class  can be 
initiated against other class.

Ø

Represent cardinality of the class in relationship 
to another class.



6

Example


7

Bi­Directional Association Example


8

Association ­ Multiplicity


9

Multiplicity


10

Uni­Directional Association


11

Comprehensive Example



12

Task to Do: Write Requirements



×