+ 2
Association And Inheritance one basic different today i learn
Association has a relationship. Inheritance is a relationship . for eq--> class Vechile { } class Car extends Vechile { } âââcar is a vechile or vechile is car.. car has a music system is a Association.. If i'm wrong somewhere pls correct me???
3 Answers
+ 9
Car is-a vehicle. Good example, I think you got it ;)
+ 2
thanks and..
i really appreciate. you
for your patience while try to explain me..
+ 2
Inheritence is "is-a" relationship.
e.g Car is a vehicle.
Association is "has-a" relationship.
e.g Car has a music system.