# Association, Aggregation, Composition, Abstraction, Generalization, Realization, Dependency

26/06/2010

These terms signify the relationships between classes. These are the building blocks of object oriented programming and very basic stuff. But still for some, these terms look like Latin and Greek. Just wanted to refresh these terms and explain in simpler terms.

## Association

Association is a relationship between two objects. In other words, association defines the multiplicity between objects. You may be aware of one-to-one, one-to-many, many-to-one, many-to-many all these words define an association between objects. Aggregation is a special form of association. Composition is a special form of aggregation.

Example: A Student and a Faculty are having an association.

## Aggregation

Aggregation is a special case of association. A directional association between objects. When an object ‘has-a’ another object, then you have got an aggregation between them. Direction between them specified which object contains the other object. Aggregation is also called a “Has-a” relationship.

## Composition

Composition is a special case of aggregation. In a more specific manner, a restricted aggregation is called composition. When an object contains the other object, if the contained object cannot exist without the existence of container object, then it is called composition.

Example: A class contains students. A student cannot exist without a class. There exists composition between class and students.

### Difference between aggregation and composition

Composition is more restrictive. When there is a composition between two objects, the composed object cannot exist without the other object. This restriction is not there in aggregation. Though one object can contain the other object, there is no condition that the composed object must exist. The existence of the composed object is entirely optional. In both aggregation and composition, direction is must. The direction specifies, which object contains the other object.

Example: A Library contains students and books. Relationship between library and student is aggregation. Relationship between library and book is composition. A student can exist without a library and therefore it is aggregation. A book cannot exist without a library and therefore its a composition. For easy understanding I am picking this example. Don’t go deeper into example and justify relationships!

## Abstraction

Abstraction is specifying the framework and hiding the implementation level information. Concreteness will be built on top of the abstraction. It gives you a blueprint to follow to while implementing the details. Abstraction reduces the complexity by hiding low level details.

Example: A wire frame model of a car.

## Generalization

Generalization uses a “is-a” relationship from a specialization to the generalization class. Common structure and behaviour are used from the specializtion to the generalized class. At a very broader level you can understand this as inheritance. Why I take the term inheritance is, you can relate this term very well. Generalization is also called a “Is-a” relationship.

Example: Consider there exists a class named Person. A student is a person. A faculty is a person. Therefore here the relationship between student and person, similarly faculty and person is generalization.

## Realization

Realization is a relationship between the blueprint class and the object containing its respective implementation level details. This object is said to realize the blueprint class. In other words, you can understand this as the relationship between the interface and the implementing class.

Example: A particular model of a car ‘GTB Fiorano’ that implements the blueprint of a car realizes the abstraction.

## Dependency

Change in structure or behaviour of a class affects the other related class, then there is a dependency between those two classes. It need not be the same vice-versa. When one class contains the other class it this happens.

Example: Relationship between shape and circle is dependency.

### 498 comments on “Association, Aggregation, Composition, Abstraction, Generalization, Realization, Dependency”

1. Thank you..
Looking forward for your next post…

• i dont have any programing background thats way i very confused about concept of oop so plz tell me what i have to do

• You may either go through the various topics that Joe has so wonderfully explained in different sections.
Or alternatively, for a more systematic/sequential approach, you could also read a prescribed SCJP book such as Kathy Sierra/Bert Bates. Or any recommended author for that matter. I find Kathy’s way of teaching much more effective though.

• just refer concepts and do examples u can get it.

• Very nice and easy to understand.
Concept clearing! :)
Thankx alot!

2. very nice content to start

Thanks!

4. Nice article. Explanation the concepts clearly.Thank you

5. Good article. Thanks.

7. Very nice and easy to understand in a simple definitions.

8. It will be still good iy you give examples with code also.

9. Thank you all. I will try to update the post with sufficient java source code examples soon.

10. thanks for posting.please update Java with ibatis configuration it is helpful to us

11. An example for aggregation is missing and it could be like:

A car has a stereo system.A car can exist without a stereo system. There exists aggregation between car and stereo.

12. Thanks Jyotilal for the aggregation example. Actually its otherway around.

A car has a stereo system. A stereo system can exist without a car. There exists aggregation between car and stereo.

Don’t go too technical into electronics and say a car stereo needs a car. Just for an example!

• this is a better example :)

13. Really very good and straight forward description about the Association, Aggregation, Composition, Abstraction, Generalization, Realization, Dependency. Thank you so much..

Its very handy too..

Cheers,
Prashant.

14. Superb Example.

Keep Posting Joe

15. Thanks! Very nice explanation.

16. Thanks for helping……………

17. Hi ,

thnaks for that information.

but i think i havnet understand that last.(Dependency)
does it comes with arrow or just —- lines. pls post me

18. Great Post! It clear my mind.

19. Really Good article. Nice work.

20. nice… its in a generalized way….very helpful

21. Sir. i m n trouble..if u post full code .which contain aggregation and compostion.then it will be very clear to all of us.according to programing point of view.
and realy good work u have done.we appriciate ur work…
plz post full code waiting 4 ur reply

22. very nice article… it clearly explains the basic concepts… thanx!

23. Thanks Joe for the wonderful post. It is really quite useful.Most of the times we tend to get confused with these terms as all sound the same. Few more additions would make it better:
a) Class diagrams
b) Code for Aggregation and Composition

24. Thank You Very Much… It Was Very Helpfull…

25. Thank you for addressing all relevant items.. little bit more code would be marvelous. still great. CDW

26. Good explaination mate

27. Terse explanation of Association, Aggregation and Composition..!!! :) Thanks a lot… :)

Looking forward for your next posts…

28. i searched most of the definitions for these association,aggregation and composition…u cleared my doubt …u people are explaining like baby feeding thank you……

29. jst superb…think u r bst faculty for starters..i bliv in it…”with strong foundationz u can aim for the sky.”

30. Hi,

The definition given in this site is very clean and neat and simple and very understandable instead of blah..blah…

Cheers !!!
KM

31. thank you very much for sharing your knowledge. very useful content. I learnt the concept very well to be applied in OOAD.

32. I was always get confused for these relationship but as you defined these relationship it became easy to understand. Thanks buddy :)

33. Thanks for these information. Great definition for aggregation n composition

34. Very nice page.
It contains all required information about association, aggregation, composition.
thanks a lot.
Prabhat.

35. Hi,

good article.

Thank you.

36. hi,
thanks for info.this is nice with example.this is really helpful for student as well as employee.
22/jan/2011

37. it’s so clear so far what I see!
thank you!

• thanks a lot it is simple and understandable explanation

38. Easy to understand.Nice Post.

39. Thanks ,

40. Sir,
Please let me know how to depict association, aggregation and composition in java code.

Regards,
Shylaja V.

41. please give some examples of programs as illustration for class relation……
it will be useful.
and thanks very much for this nice post.

42. Hey,

Its sweet & simple !! You made task very simple and anyone can understand.

Great Work!!!!

43. it is simple and very easy to understand
thank you,

44. simple and understanble…
Thanks a lot

• thank u a lot it is simple and understandable

45. Great Work !!!
Keep going on !!!

All the best !!

46. Very nice article. I am facing a unique situation where we have modeled a test case with two compositions between the same two entities. Is this realistic? If so, can you give me a real world example for this?

47. thank you for you very clear work joe.

48. Wow., Awesome work., Thankz,
Keep up the Good work.,

49. thanks much. very useful information

50. thanks for give simple & informational content

51. thanks 4 this outstanding content

52. mast laga maja aagaya…………

53. Excellent! Thanks so much.

54. Nice article. Keep going.

56. very Nice article……
but need some coded exemples……

BTW thank you very much.

57. very nice understanding…thanks

58. Excellent, keep it up. Can you explain some of the fewdesign patterns in better understandable way.

Thanks a lot buddy.

Girish

59. could you please provide some code samples for association, aggregation and other all oops concepts.

Thanks
Varma

60. Pingback: 装饰器设计模式 | Java视点

61. multiplicity is no given here :) pls add

thanks

62. Its a great post. Thanks Man!

63. Please give me a simple explanation with example on difference between abstraction and encapsulation.

64. hi,
very nice approach i realy like this complete definition pakage with examples

65. Really nice explanation . Simple and easy to understand
I liked the formate of your blog….the best i seen till now

66. Nice

K eep
I t
S imple
S illy

Completely Followed

Nice Simple Sober & Easily Grab-able & Understandable

67. nice, short, simple and good explanatory.

68. Sir……this is the best notes of Association I ever seen…….thanks a lot for the simple ans besr definations…

69. Very easily explained and easy to understand all the definition. Keep it up

70. too much informative

71. simply super….very useful Thanks for posting..

73. Good Artcile. it helps.. Thanks..!

74. very nice sir. . . . thank u vry much………

75. it helped me alot sir………thank u sir

76. Very good post, easy way of understanding thank u

77. Useful information with good explanation well done Joseph..

78. Thanks dude.. its really so simple to understand these stuffs…….. really gr8 work.

79. nice explanation.. thiru

80. Very Good article… Thank you..

81. thanks for simple explanation of association, aggregation, composition. Good Work…Thank you..

83. Nice Article Joe..Like very much the way you describe ,Must say Very good Article for the beginners …!!!

84. Superb Article !!!!!!!!!

85. Nice Article, Much useful for a beginner

86. very good explanation on composition and aggregation relationships

87. Dear sir, I need more explanation and example about abstraction… How to apply in c…? i use data structure linked list concept..

88. Aggregation
———————-
Aggregation is a relationship between two classes that is best described as a “has-a” and “whole/part” relationship. It is a more specialized version of the association relationship. The aggregate class contains a reference to another class and is said to have ownership of that class. Each class referenced is considered to be part-of the aggregate class

Ownership occurs because there can be no cyclic references in an aggregation relationship. If Class A contains a reference to Class B and Class B contains a reference to Class A then no clear ownership can be determined and the relationship is simply one of association.

For example, imagine a Student class that stores information about individual students at a school. Now let’s say there is a Subject class that holds the details about a particular subject (e.g., history, geography). If the Student class is defined to contain a Subject object then it can be said that the Student object has-a Subject object. The Subject object also makes up part-of the Student object, after all there is no student without a subject to study. The Student object is therefore the owner of the Subject object.
Examples:

There is an aggregation relationship between Student class and the Subject class:

public class Subject {

private String name;

public void setName(String name)
{
this.name = name;
}

public String getName()
{
return name;
}
}

public class Student {

private Subject[] studyAreas = new Subject[10];

//the rest of the Student class
}

89. This website is very useful . but i need short notes and examples for full oops concepts in c++.

90. material is good but it explain with diagram then it is more effective for readers

91. Nice explanation. It would recommend to add few more real world examples that could help to understand it more easily.

92. Nice explanation on the topics of association, aggregation and composition with quite undrestandable language.

93. Excellent, A quick glance with best understanding. Keep it up

94. very helpful and easy 2 understand
Thank you

95. You mentioned in this article – Abstraction is specifying the framework and hiding the implementation level information. Abstraction never says about hiding anything. Let’s take an Example of Employee with Super class and Manager and Salesman bening subclass of Employee. So if Employee may provide various implentation in common, but can’t have implementation for calculateBonus because this is fully dependet on nature of employee subclass, and hence Employee would have calculateBonus as abstract. So overall, abstraction is isolation of common essentioal behaviour and supress unimportant behaviours. Abstraction never meanse hiding anything. Hiding of implementation from accidental access is Encapsulation.

Thanks
Arun Deo

96. This is very nice explanation with the examples. It helps to crystal clear the things, that have very confusing boundary among them.

97. Its really nice.I was always get confused for these relationship association, aggregation and composition.Thanks a lot

98. its really nice. keep going its really helps lot,

Thanks,
Prabhu.

99. Wonderful… Very nice simple & easy to understood details which might be very complex for beginner……

100. Nice Article on relationships

101. really it’s a nice content that you provide through this web. It removes all of my confusion.
thanks

103. Sir, i want to briefly explanation of attributes……..

104. thank u soo much, nice explanation , i really want this :)

105. Very nice post.. i have never experienced such
simple examples for explaining such complex terms like aggregation and composition
i thought so far.. Keep posting…

106. Best article on association aggregation composition

107. Hi, may I seek a clarification about generalization concept. Let’s say I have a two kinds of staff, Manager and Supervisor and both have the same attributes (name,contact number). So, is it possible to say that this has a generalization relationship – Staff as the superclass, Manager and Supervisor as its subclasses althought there’s no difference in terms of the attributes between Manager and Supervisor?

108. Thanks you very much for share good knowledge for me .

110. very nice artical!!

111. Very nice explanation about class diagram terms…

112. Questions
1. Identify and briefly explain the objectives, classes, method and attributes for a hotel reservation system.
2. Draw a use case diagram to represent a hotel reservation system.
3. Draw a class diagram that models hotel reservation system data structure, clearly representing the objects, classes, associations, generalization and aggregations.

Thanks

113. Questions
1. Identify and briefly explain the objectives, classes, method and attributes for a hotel reservation system.
2. Draw a use cases diagram to represent a hotel reservation system.
3. Draw a class diagram that models hotel reservation system data structure, clearly representing the objects, classes, associations, generalization and aggregations.

Thanks

114. Really simple and excellent explanation. Easy to understand for beginners…!!!

115. Superb Explanation…Keep It Up!

116. identify in detail association and aggregation

117. crystal clear dude.

118. Thanks..!! M sure your examples gonna help in tomorrows exam.

119. @Sanchit

I feel very happy when I get to know that my blog helps a student.

More than anything, I maintain this to help students succeed in their exams / interviews.

120. A book CAN exist without a library…. Incorrectly quoted…… Rather a library CANNOT exist without a book….

121. Write an example program each showing dependency,
generalisation relationships in JAVA

122. Nice explanation. If you would provide with one example all the above along with diagams that would be excellent.

123. Good article. One of the questions mentioned above, was related to manager,supervisor and staff. Certainly there is a generalization relationship with Staff as superclass and manager and supervisor classes are subclasses inheriting from Staff. Though attributes could be same in manager and supervisor when it comes behaviour(methods) manager and supervisor classes are specialized with inheriting the generic class i.e., Staff.

124. Thank’s man for this article, i found it very helpful for me. Am studying SCJA and i was looking for any comprehensive material for UML basics like this one.

125. its nice. very simple defnation. easy to understand.

126. Awesome post!!!Keep it up.

127. Nice article on UML concepts. The content of the article is very simple to understand. Thanks.

128. Nice Post, Hope to get same clarity on design patterns.

Thank you.

129. very nice…nd thanx..

130. NUMBER # 1
Very Clear Topic About the English WORDS “Aggrega…composi…reali…generai….etc etc…etc”

But how can i understand when i want to implement your dictionary details (read NUMBER # 1) on practicing programming ???
specially JAVA…

131. Awesome notes.

132. Awesome…….really good way to understand newcomers!!

133. Simple & Clear Explanation for the beginners.

Thanks!!

134. this is simple way to understand any definition

135. Awesome…….really good way to understand newcomers!!

Thank you.

136. easy way to understaing.
thanks….

137. Clean & clear explanation. Thanks Joe.

138. Simplysuperb, lots of information with very simple words.

139. really clears the confusion.

140. Nice way of information.
Thanks………………

141. Really good man easy to understand

142. really helping me a lot….
u r dng a great work.Thank You

143. is it nice…

i have got some idea…

thanks ..

144. you have to increase the paragraph

145. very nice explanation.

146. neat and clear description dude…

147. Hi.. Useful explanation and easy to understand. thankyou

148. This is good post. thanks a lot

149. Its really post .

Vidhi Jain

150. Very nice…Thanks

151. best for beginner….like me
thank you sir

152. explained in very effective n simple way

153. explained in very effective n simple way, doing a great job

154. please change the background color, so that it would be more readable

155. Thank you very much sir. It is ow-some….

156. Good to start for beginners and experienced juggling between these concepts.

157. Thanks a lot , good explanation with easy example ..

158. Thanks :Great people explain concept in the simple and easy understandable way.

159. that was a very good explanation. simple and easily understandable…

160. thanks. great for beginners

161. Thanks It helps to clear my fundamental

162. all clear ………very gud job !!!!

163. its really very usefull and understandable

164. I never thought this small and simple article would become a great hit.

I learn that, more and more we make the technology simple people like it.

165. Quike guide to understand the basics…great work…thanks a lot…

166. Very good explanation. Thank you

167. thanku its very easy to understand and very easy explanation

168. thanq so much….its very nice …

169. please explain more sir,with example..

170. Good Summary. Thanks a lot!
A simple class diagram to explain the direction of the relationship would be great, if can be added

171. nice explanation. very useful. thanks

172. very nice explanation

173. Nice explanation of the terms…

174. nice definitions :)

175. pallabi baruah wake up!!!!listen to ur tech lead!!!

176. very nice explanation! keep it up

177. very nice explanation! keep it up

178. Goog Explanation. Keep going….

179. thanks this really gives the clarity of this topic

180. Thanks you very much yar

181. very nice and better explain with subject examples also,its nice but iam feeling

182. Thanks this helps !

183. pls write about specialization also

184. very nice………
thank u so much

185. can you please explain opps concept in aquarium system? Means how can i explain an aquarium using OOPs

186. One of good artical and understandable.

187. Great and a very simple way to explain a confusing subject. Thanks a lot for this Post.

188. GOOD and NICE and SIMPLE Explanation……..

190. good site thanks

191. Thanks very much nice information about Generalization, Aggregation, Association, Composition, Dependency,, only one time i have refereed to it but absolutely i got******

192. the content is really very good..

193. nice information thank u logical examples have been provided

194. Really useful for beginners.
Thanks,

195. good information and very useful to the beginners .

thanks,

196. Good Information..

It will give an basic idea to all who dont have base knowledge on these.

From
Krs Rajasekhar

197. Good Information..

It will give an basic idea to all who dont have base knowledge on these.

From
Krs Rajasekhar

198. thanks a lot, you helped us completing our assignment. :)

199. Nice explanation yaar

200. Very nice content. I like it. The best site and very comprehensiveness information I ever found.

201. Simple and easy understandable writing. thanks alot for your effort.

202. Simple and very clear to understud thaks

203. Woow..very Nicely explained…

204. Sir what is the difference between generalization and specialization ??????

Justifying the statement ,”inheritance is a special case of Generalization”.

206. Thankyou… nice article.

207. Clean and clear explanation. Thanks a lot.

208. Thanks a lot for such an easy explanation. Examples are also easy to understand and correlate.

209. Thanks a lot Joe, Very Useful information with simple language and good examples.

210. nice explanation..

211. I love your blog and find helpful…thanks for your great passion! You people make the world really great!

212. Nice and very helpful Article….

213. Thank you… nicely explained..!

214. nice simple article

215. The Post would become more clear if you difine these concepts in terms of object’s life Cycle.

216. Thanks
Nicely Explained

217. Best explained concept across the internet .
I was confused about those terms before reading these article . Thanks a lot. It’s helps me a lot.Will go through to other article.

218. First i was confused but now i am confidece
Thanks alot

219. very nice.. Thanks….

220. Very good explaination

221. good loooking web site sir…

222. thanks ..this is very good artical

223. help me alot….thks

224. Thanks for the explination. If a sample code is given it will become even more better.

Prem

225. Thanks for your good job…

226. good explaination joe, thanks

227. good explaination joe, thanks

229. ijust hv a doubt about composition ,as a example “A circle is composed of points”.
then i think points are exist without circle ,,but according to u points r not exist without circle ..plz explain.?

231. very Clear n nice explaination …
thank you!!

keep it up !!

232. very nice content to start
thanks

233. Hi Joseph,

This site is of great use for a java programmer like me.

Thank you so much.

234. really nice to see this site…

235. very lucid and helpful. thank you.

236. In defining the Composition in top of page, I think the sentence should be
“…, if the container object cannot exist without the existence of contained object, then it is called composition”
instead of “…, if the contained object cannot exist without the existence of container object, then it is called composition”

237. I Think U are right Hikmat.

238. Good Article worth Reading. Nice Job!!!

239. Nice article.
Adding some example, hope till will support the article.
There are four kinds of Class relationships

Association: uses a
Ex:a Class Man uses a Class Pen
Aggregation: has a
Ex:a Class Man has a Class Car ( Car is still there when Man die )
Composition: owns a
Ex:a Class Man owns a Class Heart ( When Man die, Heart die )
Inheritance: is a
Ex:a Class Man is a Class Human ( Man is a Human )
A relationship between classes of objects

Inheritance>Composition>Aggregation>Association

240. excellent. i best site i found till now for jAVA.

241. its my OOMAD exam today and these definitions really made me relaxed regarding their easy understandibility.
Thnxxxxxx buddyyyyy

242. Could you please share with java code examples.

A implements B is realization
A extends B is generalization

AM I right?

243. sir…you should use email validation in comment box…..
and your site content is awesome….i loved it….

244. Sir…it clearly differentiated the terms for a novice programmer.

245. Thanks!!:) It was really worthy.. Short & to the point.. Clarifying examples played vital role in understanding.. ‘Thanks’ once again..
_Js

246. Clear explanation with simplicity!
Thanks

247. Really a useful stuff to understand object relation ship.

248. Content is very good and the site is also looking so good keep it up sir,…

249. very helpful and easy understanding

250. it’s really good artical…..

251. hii thanks for information
kamal gaba

252. excellent clarified wit d example

253. Simply superb
Thank You

254. very nice it help me for my next interview :)

255. clearly understand, very good writing. Thank you.

256. very brief and appropriate….
easy to understand………thanks

257. Easy to understand. Nicely presented.
Thanks

258. excellent and simple language use for examples
thanks
Tusshar Kavthekar

259. thank u …………

260. I was screwed in a interview for all these.. thanks for sharing…really good one..

261. bhiya tussi to cha gaye…

262. It will be great if you have some real life example on this..

Thanks Kausik

263. Thanks a lot for great article and your efforts.

264. Nice,Its easy to understand
Thanks

265. thank you sir……….

266. i want to know..
how one to one association,many to many association and ternary association is define?

267. i need a sample class diagram with a certain relation(sample in hotel management system)

268. i need a sample class diagram with a certain relation(sample in hotel management system)

269. beautiful explanation. understanding is very easy when we refer such explanations

270. thank u very much for u r clear explanation..

271. Nice to read and understand the differences with examples. Thanks !!!

272. Its very straight forward information and clear

273. thnks joe. i found very correct and simple concepts here.

274. pls give example also…

276. Had confusion with all these terms..your way of explanation is very simple and straight forward..thanks

277. unclear definitions

278. i want full details about the relaitonship between objects

279. Short and clear thanks for the detailsBharath

280. Dependency explanation is need to be amended as follows.

Dependency is a weaker form of relationship which indicates that one class depends on another because it uses it at some point of time. One class depends on another if the latter is a parameter variable or local variable of a method of the former. This is different from an association, where an attribute of the former is an instance of the latter.

281. It is most simple and very clear,

Thanks

282. it is very clear understading me .please send me the inlinefunctions invoke at compiletime or runtime.

283. Really very nice… It very easy to understand and build class diagrams.

Thanking you
Regards

Vinyas A M

284. This post is very helpfull to understand the basic concept of association and understands the association type aggregation and composition type ….

285. Thank you…..
could you please explain these association,aggregation,composition and dependancies with a sample scenario with java classes implementation…..

286. Impressive. Why not start a training site for Object Orientation. Good work!

287. nice explanation joe…

288. i need more elobration with respect to the programs

289. i need more elobration with respect to the programs , and these are very good example……..joe..thankx a lot.

290. Good explanation. I think you must give examples using code to clearly understand, so that programmer can easily corelate.

291. nice elaboration and nice website design

292. thank you joe..

293. thanx joe sir….
u explained it very well…..

294. Hi, Joe!
But… you write: “A book cannot exist without a library and therefore its a composition.”
I think more correctly would be as follows:
“A library cannot exist without book and therefore it’s a composition.”

295. very good explanation thanks…………..

296. earlier i confused to understand about these topic .but by the God i found your site, and understood these all topics with in few moments.

nice site

297. nice explanation for UML easy understanding…Please continue this short of topics

298. good article for basics

299. Very Nice and easy explanation.

Thanks Joe.

300. superbly explained.. :)

301. Thanks Joe it really helps…. simple and effective.

302. Theory is good , but how we want to apply this theory in programmatic, while thinking like this that is too difficult.

303. hi Joseph ,
I am Arun Raja Do u remember me ?
I worked with you…

Your blog is good and informative.

304. Hello Joe,

Simple and clear explanation. Should be very useful for interview point of view as well. In my experience, whenever UML interview questions starts, they mostly ask these kind of basic questions to test the understanding. Thanks a lot. This should help many folks.

305. hello sir
very nice article

306. Thanks sir..
Very nice article..

pooja agrawal 29 August 2012

307. great !! helped a lot ..
thank u..

308. very nice!!!! thanks.

309. Very Nice Definitions

310. thanks a lot!!! ur posts are just awesome!!!

311. Specialization is missing

312. very good explaination and better diagram understand.

313. all definations are correct and better daigrams to understand the relationships.

Really useful for beginners.
Thanks…………

314. this is excellent explanation..

315. very generalised explanation of the concept
and thank you for that.

316. Gud Attempt.. Keep it up.. Try to give java examples

317. nice post…keep up the good work…

318. Hi,
You gave your explanation in very simple worlds. So i understood very well. Thank you very much.

319. thanks a lot its awsome

320. Very ease to understand…. :)

321. Precisely written. Useful, easy to read and understand.

322. simple to understand…with real life egg

323. Its really very easy to understand.. Thanks a lot

324. such a nice information .it will help everyone..

325. thanks for this

326. thank you very much!!!!

it is very conceptual and you explained it very effectively…..

327. It very understandable.

Thanks
Mamatha

328. Deberían agrandar la definición de Agregación.

329. good explanation…….

330. Clean and Clear explanation….Appreciate it.

331. Thank you

it was very useful for me

332. Very helpful and easy t understand

333. Very helpful and easy to understand.
Thanks

334. Very well explained , Thank You Joe.. & keep posting.

335. ur way of explaning is vry effective..!!
keep going ..!!
thankz a lot..!!

337. Indeed this is a very good post.
If i have understood correctly,then will it be ok to say that a child in a mother’s womb is an example of composition and after birth,a mother-child relation can be called aggregation.
Request all learned to please correct me if i have understood incorrectly.

338. Thanks.:) Clearcut definitions. :)

For association, aggregation and composition could you please put real time exmaples with come classes?

Nice work ..

339. thankx..i got alots of information from here…hope you help me in future..

340. When i read your articles, i get the impression that anything can be easy to understand if its explained in such a way….

341. a unique explanation of relationship among class more than any cse book thanx… alot

342. Your site is awesome if you are not trying to impress me.But it took me two days for scrolling whole website and see and ya your background color is so good that I tried six different varieties of colored spectacles but I couldn’t see even a single thing.But above all the best part of your website is it doesn’t support cross-browsing stability.

I am working to fix the theme and you will get a better user experience soon.

344. Clear explanations and examples :)

345. Thank you so muchHHHHHHHHHHH sir :-) :-)

346. thank u sir very clearly explained

347. Good Explanation.

Thank you

348. great work very simple and strong example.Keep it up

349. easy to understand

350. very helpful and easy to understand……
thanx sir……

351. Very simple and easy to understand definitions.. It is very good to refresh. Thanks

352. Hi! Deep thanks man! couldn’t have been simpler!

353. Really helpful to brush up the concepts.Thanks for posting such a nice article.

354. Good Explanation. Thanks a lot!
A simple class diagram to explain the direction of the relationship would be great, if can be added.

355. very nice and interesting article, very much appreciated.

356. nice explaination,thanks’

357. Good explanation, Keep up good work Joe.

358. thanks a lot for this post. This will be really very helpful for me.

360. Hi Joe, Thanks a lot for explaining these concepts clearly with real time examples. But if you could explain these concepts with small programs, it would have been fantastic. Looking forward to this…

361. it was really heipful

362. bundle of thanks. its very helping

363. very helping and good examples. good explaination.

364. Hi Joe, very nice explanation.
I just got doubt about the sentence in “Generalisation” , you wrote as – Common structure and behaviour are used from the specializtion to the generalized class.

or it should be as below.

Common structure and behaviour are used from the generalized to the specializtion class.

365. Really good article , thanks a lot.

If you can provide the UML examples using symbols(aggregation,composition and generalization) will be more useful.

366. Nice explainations….really nice…thnks a lot

367. awesome dude..very easy to understand. saved a lot of time.

369. And also about the four types of drivers in jdbc briefly

370. Hi Joe,

Really nice explaination………

371. Hi Joe,

Really nice explaination………

372. “Suppose we have implemented a scenario and we used aggregation in it, after some time we realize that use of aggregation is not a correct choice, now we want to use composition instead of aggregation. Can we replace composition with aggregation? At which phase(s) these changes are required? Justify your answer with solid reasons. ”

sir this question is related by C++

374. I surely benefited from this blog and i urge the Blogger to do more to improve our IT’s mind of Technology

375. its really very helpful ,thanks so much :)

376. its great thanks

377. very Clear n nice explaination …
thank you!!

378. in ooad(Object Oriented Analysis Design and UML)

1)Is association class same as ordinary classs? Explain with example.

plz send ans

379. very thanks joe because wt u have given is very much understandable.

380. Great job joe.. awesome explanation :)

381. Kudos for keeping the explanation so simplistic.

382. really very nice description about all the concepts……..thanks.

regards shital

383. Really it’s very helpful. Examples clears the concept

384. its a useful information…thanks

385. Awesome tutorial. Very much usefull if u use simple diagrams for further explanation.

386. our sir tought 3 relationships, it is clear and is-a and Has-a but one more is Uses-a
which of the above concept comes user Uses-a ?

• Association: uses a
Aggregation: has a : strong association
Composition: owns a : weak association
Inheritance: is a

387. Thanks alot..really helpful clear the confusion on aggregation.

388. Its very clear explanation,please provide some code examples

389. what do u mean by links in java???

390. Gr8 explanation ….
Easy to understand…..
Thanks alot:)

391. Thanx,
It’s really nice
i cleared my dought…..

392. thank you very much , it was really interested explanation

393. good explanation!!

394. Hi Joe, Thanks a ton! This is an awesome, anyone can understand the difference seeing this post.

Request you to add Java code to show the implementation difference between Composition and Aggregation.

395. Excellent Explanation………I bookmarked your pages..Thanks

krishna

396. Its crispy and understandable.thnk u!!!

397. U Say ‘ if the contained object cannot exist without the existence of container object, then it is called composition.’–>with example Library–>Books
With your definition ‘Books can not exists without Library’..How’s this ? ..or is it the other way round ‘Library can not exists without Books’??
I am damn confused?