There are three type of relationships in java


- Generalized and Specialization(is a -relationship)
- A class is similar to other class
- A class is different type of another class.

- Aggregation(has a -relationship)
- A class has a Object of other class as member variable
- Another class is part of class

- Every customer have Address
- Relationship between Address class and Customer class is Has-a relationship

- Every bill payment have some header to it so Purchase class uses PrintHeader class to print the header
- Relationship between purchase class and PrintHeader class is Uses_a relationship
- Inheritance
- Aggregation
- Association
0 comments :
Post a Comment