CRC stands for class responsibility collaborators. Like physical cards, CRC cards represent a single class along with its name, attributes and methods. Class represents the class name, the attributes and the methods represent the responsibilities and the collaborators determine the relationship of the class with the other classes. CRC cards are very useful during class design and analysis.
Inheritance using UML diagram
Inheritance means child class inherits some features (attributes) of parent class.
Following example shows that parent class inherit attributes(title and name) of person class.
Aggregation using UML
Aggregation represents a part-whole relationship using two classes only. Here child class is not dependent on parent class.
Example of car-wheel is a part- whole type. Here car needs a wheel to run but wheel don't always need a car. Wheel can be used for bike or any other vehicle. So wheel is independent of car.
Dependency using UML
In dependency relationship one element is dependent on other element and changes in one element may change/effect other element as well.
example of product and cart is a dependency relationship because cart is dependent on the price or number of products added.
If you like the answer please give me a thumbs up...
Get Answers For Free
Most questions answered within 1 hours.