UML Class and Object Diagrams | Association vs. Aggregation vs. Composition | Geekific

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น • 120

  • @josuehernandez2784
    @josuehernandez2784 2 ปีที่แล้ว +56

    I honestly believe that everyone having troubles to understand relationships should watch this video. It helped me a lot! Thank you

  • @musabansari8607
    @musabansari8607 11 หลายเดือนก่อน +5

    Maybe the best content on this topic in the entire youtube. Very Comprehensive Video. Thanks Geekific.

  • @zladtv1456
    @zladtv1456 ปีที่แล้ว +2

    I have been trying to understand where to use associations by watching tutorials for an hour and 10' now. Finally I understand. Thank you!

  • @okko7788
    @okko7788 หลายเดือนก่อน

    Not only you've explained the three associations well (although not all like with abstract or interface classes and the relations that come with them), but your UML "synthax" is correct. Well done.

  • @yasukunijinjatoilet
    @yasukunijinjatoilet 11 หลายเดือนก่อน +3

    I believe there is something wrong with the object diagram show case appers at 9:26 regarding to the relationship directions between subaccounts and bandaccounts.

    • @aulerleandro
      @aulerleandro 11 หลายเดือนก่อน +1

      I also noticed, small mistake

    • @geekific
      @geekific  9 หลายเดือนก่อน

      Yes! It is noted in the description, sorry about that.

    • @yasukunijinjatoilet
      @yasukunijinjatoilet 9 หลายเดือนก่อน

      @@geekific Nice. Thanks for the well designed tutorial!👍

  • @4thehood
    @4thehood 6 หลายเดือนก่อน

    This is really helpful video to understand the difference between the relationships of classes. Watched so many videos before this one, but this is the best match!! MUST WATCH!!!

  • @willft520
    @willft520 2 ปีที่แล้ว +9

    On the last example at 9:09, there's a mistake on the relationship between the SubAcnt and the SavingAccount objects as the SubAcnt objects appear containing the SavingsAccount object, but it should be the other way around, with the filled diamond on the SavingsAccount side.

    • @geekific
      @geekific  2 ปีที่แล้ว +3

      Yup, thanks for sticking till the end! Was mentioned multiple times in the comments :)

    • @willft520
      @willft520 2 ปีที่แล้ว +2

      @@geekific Thanks for the reply and, of course, for the content of your video! I like very much the way you explain things! Sorry I wasn't careful enough to check if there was any comment on that error, I did a quick search and didn't see anything about that loaded on the top comments at least so I decided to leave that message. I've been researching this topic lately, I've learned a lot and redefined many concepts I thought I understood already.

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      I am so happy you found our videos helpful :) On the contrary thanks for mentioning it, you're helping a lot :D

  • @_rtdp_
    @_rtdp_ ปีที่แล้ว +2

    This is the only video lecture where I clearly understood class relations 😭😭😭... Thank you very much ❤️❤️❤️

  • @flpflpflp
    @flpflpflp 2 ปีที่แล้ว +3

    Thank you for taking the time to record this. It was really helpful.

  • @rayTsang8399
    @rayTsang8399 ปีที่แล้ว +2

    The video clearly explained how the association relationship evolved into aggregation and association relationships, and the drawing of the symbols, and the difference between class and object relationships. I watched many videos before and read a lot of articles, but each time I got more confusion as I watch/read, very frustrated. finally, I got it all figured out. To make your video more complete, it would be nice if you could add some real code along with the video. After all we want to code. Thank you.

  • @NavigateThroughUniverse
    @NavigateThroughUniverse 9 หลายเดือนก่อน

    you have the best teaching skill among the youtubers i've watched , keep it up bro ....!

  • @nickpratt9338
    @nickpratt9338 2 ปีที่แล้ว +1

    Best explanation I've heard on this topic. I don't think ever really understood it until now.

  • @anderskristoffersen3270
    @anderskristoffersen3270 ปีที่แล้ว +2

    Why do the diamond arrows point in different directions in classes (6:30 min) and objects (9:20 min)?

    • @geekific
      @geekific  ปีที่แล้ว +1

      Are you referring to the "correction" mentioned in the description?

  • @sadam_khan
    @sadam_khan 2 ปีที่แล้ว +1

    Like trump says, it was the best of the best tut on this topic. Finally grasp the concept with clarity.

  • @vengateshm2122
    @vengateshm2122 3 ปีที่แล้ว +8

    10 minutes of effective knowledge. Thanks to you and TH-cam algo for bringing your videos to me which keeps me updated with these information.

    • @geekific
      @geekific  3 ปีที่แล้ว

      So nice of you! It's my pleasure man :)

  • @romankost8828
    @romankost8828 2 ปีที่แล้ว +1

    Super explanation with the much needed humor!

    • @geekific
      @geekific  2 ปีที่แล้ว

      Glad it helped!

  • @jorgepinilla5494
    @jorgepinilla5494 5 หลายเดือนก่อน

    greatest video of uml class model

  • @FredBwalya-ge5fr
    @FredBwalya-ge5fr 7 หลายเดือนก่อน

    Very helpful video. I watched it once and got the concept.

  • @SlimBenRomdhane-u4g
    @SlimBenRomdhane-u4g หลายเดือนก่อน

    Thank you for the expalnation, that was very insightful I have a question though why there is aggreagation between customer and account why just dont you use one-to-many relationship ?

  • @stephenkiss4614
    @stephenkiss4614 3 ปีที่แล้ว +11

    Great content! Are the composition associations from the SavingsAccount to the SubAcnt backwards? I thought the filled in diamond node at the end of the association was supposed to be connected to the more generalized
    container

    • @geekific
      @geekific  3 ปีที่แล้ว +3

      Thanks :) Ohh, at the very end in Object Diagrams, it's direction should be exactly the way it was while explaining Class Diagrams. Kudos to you, well done

    • @braineedly7543
      @braineedly7543 3 ปีที่แล้ว +1

      7:50 How on earth Customer have relation and knowing when Bank Event without have anything about Bank Event?

  • @IsaacC20
    @IsaacC20 9 หลายเดือนก่อน

    Multiplicity wasn't explained very well. Allow me to clarify:
    The multiplicity attached to each class indicates how many instances of that class can be aggregated-by/composed-by/associated-with a *single* object of the other class.
    For example, the relationship @4:53 says two things: (1) "0...N BankAccount(s) can be aggregated by each single Customer object" and (2) "There is exactly 1 Customer object for each single BankAccount object". Similarly, @7:23 (1) "0...N BankEvent is associated with a single Customer object (i.e., a Customer can attend 0 or more BankEvents)" and (2) "0...N Customer is associated with a single BankEvent (i.e., Each BankEvent can have 0 or more Customer(s))"

  • @azurtle
    @azurtle ปีที่แล้ว

    shouldn't the object diagram at 9:18 be bankAcc: milesAccount not milesAcc : milesAccount?

    • @geekific
      @geekific  ปีที่แล้ว

      Thanks for pointing that out! This was actually mentioned as part of the description! Cheers :)

  • @dddd-ci2zm
    @dddd-ci2zm 2 ปีที่แล้ว

    Excellent! This is the best description of the arrows~

  • @asiframzan437
    @asiframzan437 ปีที่แล้ว

    This is an amazing explanation, and the result is that I'm able to highlight a mistake in the Object Diagram when aggregating SavingsAccount to SubAcnt. In fact, the diamond shape must be towards SavingsAccount because this SavingsAccount is a container for SubAcnt, just like Customer, which is a container for BankAccount.
    Regards

  • @SrinivasNirvana
    @SrinivasNirvana 10 หลายเดือนก่อน

    I have a different opinion that except inheritance others like association aggregation and composition talks about object relationship. Where Inheritance is all about relationship between classes.

  • @ShivTattva-j6m
    @ShivTattva-j6m 7 หลายเดือนก่อน

    By hierarchical relationship
    sub class can not exist without super class it is same as composite aggregation ???

  • @kzvlogs7186
    @kzvlogs7186 ปีที่แล้ว +1

    Thank you for explaining so clearly.😊

  • @yogeshkumargupta265
    @yogeshkumargupta265 2 ปีที่แล้ว +1

    I learnt about a dotted line notation with open arrow at the end, which denotes dependency. I am unable to understand what is the difference between dependency and association. Like, With your example, Customer class has a method for subscribing to BankEvent. So Customer has an association with BankEvent, at the same time, Customer is dependent on BankEvent. Isn't that always the case????

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      Good question! A class is associated with another whether it has it as an attribute / property or no. If it is an attribute, then it either falls under aggregation or composition as explained in the video, if not (if it is only used as a method parameter or return type etc.) then it is a dependency. Hope this helps :)

  • @abhilashpatel6852
    @abhilashpatel6852 ปีที่แล้ว +1

    This is gold.

  • @williamaditama1352
    @williamaditama1352 11 หลายเดือนก่อน

    In the last object diagram, aren't the composition arrows inverted?

    • @geekific
      @geekific  9 หลายเดือนก่อน

      Yes! It is noted in the description, sorry about that.

  • @ravithun5347
    @ravithun5347 4 หลายเดือนก่อน

    Thank you for your good explain

  • @MuhammadUsmanQasim-es8fm
    @MuhammadUsmanQasim-es8fm ปีที่แล้ว

    You're a life saver bro 🙌

  • @saadfarraj5656
    @saadfarraj5656 3 ปีที่แล้ว +1

    you are really doing a good job here .

    • @geekific
      @geekific  3 ปีที่แล้ว

      Thanks a lot! Glad it was helpful!

  • @kbpmowrya
    @kbpmowrya ปีที่แล้ว

    Seems direction of subAccount direction might be pointed opposite in the Object daigram. Please correct me if i am wrong

    • @geekific
      @geekific  ปีที่แล้ว +1

      Mentioned in the description!

    • @kbpmowrya
      @kbpmowrya ปีที่แล้ว

      @@geekific Thanks

  • @braineedly7543
    @braineedly7543 3 ปีที่แล้ว

    7:50 How on earth Customer have relation and knowing when Bank Event without have anything about Bank Event?

    • @geekific
      @geekific  3 ปีที่แล้ว

      There is a relation between the two as action is being taken by the Customer when provided with an Event, so, it does know stuff about the event and act upon them but it is not storing these event, it is not a *container* for these events and hence it is not an Aggregation, that was the whole point :) Hope this answers your question!

  • @SaimaAnwar-y3b
    @SaimaAnwar-y3b ปีที่แล้ว

    When Object diagram is formed, where is Bank aount lass is gone? WHY is it not there in Objet Diagram

    • @geekific
      @geekific  ปีที่แล้ว

      Because you create objects based on implementations and not abstractions!

  • @oleksandrsmyrnov8295
    @oleksandrsmyrnov8295 ปีที่แล้ว

    Thanks for the video. But regarding that association between BankEvent and Customer. Point is why did you decide to relate BankEvent to the Customer at all? I would create a Bank - class and relate it to the Bank (as a composition, cause event can't exist without a bank).. For me the question of necessity of having an "association" option remains unclear. Could you make maybe another example where havng "association" in unavoidable?

    • @geekific
      @geekific  ปีที่แล้ว

      Thanks for the feedback, well received! We will try to answer these concerns in future videos. Stay Tuned!

  • @swarnas2313
    @swarnas2313 2 ปีที่แล้ว +1

    Wonderful explanation 😄. Keep producing more of these content with us 💟

  • @sarthakgiri4596
    @sarthakgiri4596 ปีที่แล้ว +1

    wow literally wonderful

  • @dukkanchocolate7754
    @dukkanchocolate7754 2 ปีที่แล้ว

    ياعم انت جامد ياعم♥️
    Thank you

    • @geekific
      @geekific  2 ปีที่แล้ว

      Thanks a lot! Glad you liked it :)

  • @KizilBoss
    @KizilBoss ปีที่แล้ว

    Thank you for the great video. I am struggling with the banccount class and the subclasses. As you did the object diagram there was no bank account obejects only savingaccoubt and milesaccount object.
    Is backaccount an interface or abstraxt class? Customer has a list of Bankaccoubt how it will work with saving accounts and milesaccount because its not the same type.
    I am honest great uml explanation but i am confused af 😢.
    Can you explain it? I would love it if you could explain whrn to use inheritance or Interface? Thank u
    Update: ok, Bankaccoubt is an abstraxt class so we can create instance of the the inplementation as Saving Account and Milesaccount. Can we use only base and subclasses instead of interface and implementing classes? Plz do an video 😵‍💫 I am for the first time really confused.

    • @geekific
      @geekific  ปีที่แล้ว

      Can you please clarify as to what is the confusing part exactly? Is it the difference between abstractions and interfaces?

    • @KizilBoss
      @KizilBoss ปีที่แล้ว

      @@geekific yes, thats the first Question, second is what if we use only inheritance for bankaccoubt and the subclasses? Will it work? If not what is the scenario of using inheritance and not abstraction? Thanks

  • @trilecao9014
    @trilecao9014 ปีที่แล้ว

    Thank you so much. It helps me have a clear understanding about relationships.

  • @ashrafalz7599
    @ashrafalz7599 3 ปีที่แล้ว

    u just helped me to pass my test.....thanks alot !!!

    • @geekific
      @geekific  3 ปีที่แล้ว

      Glad I could help! All the best :)

  • @Manojshankaraj
    @Manojshankaraj 3 ปีที่แล้ว +1

    Really amazing job with the explanation!

    • @geekific
      @geekific  3 ปีที่แล้ว

      Thank you! Glad it helped!

  • @desboom7890
    @desboom7890 2 ปีที่แล้ว

    Great video. I have a question regarding aggregation. So how do we determine the place of the "diamond symbol"?. If the diamond is placed at the "customer class", does it mean that a customer has a bankaccount or a bankaccount has a customer? It is probably a bad example here since both things are possible...

    • @geekific
      @geekific  2 ปีที่แล้ว

      Thanks! The "diamond symbol" is usually placed on the container class. Hope this answers it!

    • @desboom7890
      @desboom7890 2 ปีที่แล้ว

      @@geekific yeah. Thanks!

  • @sakshamchhabra1175
    @sakshamchhabra1175 ปีที่แล้ว

    How can bank account exist if there is no customer?

    • @geekific
      @geekific  ปีที่แล้ว

      You are thinking about it from a real-world perspective, in the video we are doing this from an implementation / a technical perspective.

  • @andreilauran7513
    @andreilauran7513 2 ปีที่แล้ว

    Hi, cool video. I have one question tho: shouldn't it be a dependency relationship between Customer and BankAccount instead of an association one?

    • @geekific
      @geekific  2 ปีที่แล้ว

      Thanks! Can you please elaborate? It is already set as an aggregation in the video.

    • @andreilauran7513
      @andreilauran7513 2 ปีที่แล้ว

      Oh sorry, i meant BankEvent, not BankAccount.. didn't notice

  • @zsoltfehervari625
    @zsoltfehervari625 2 ปีที่แล้ว

    The direction between subaccount and account is different in the two models...isn't it?

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      Yes it is, in the object diagram it is switched, I can't fix the video but because it is not the first comment addressing this, I will add it as a note in the description :) Cheers!

  • @doriansmith5667
    @doriansmith5667 ปีที่แล้ว +1

    Thank you. Blessings

  • @krzysztofskibniewski5608
    @krzysztofskibniewski5608 2 ปีที่แล้ว +1

    Great video 👍, it explained a lot to me, but I miss converting UML to code to see what the code looks like digested with such a diagram.

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      Thanks! Great idea, will try to cover it in an upcoming video :)

  • @kendellferguson5021
    @kendellferguson5021 2 ปีที่แล้ว

    my university lecturer is great but you really helped me understand this more

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      Glad I could help! :)

    • @sultanahmadsabawoon6030
      @sultanahmadsabawoon6030 2 ปีที่แล้ว

      You're one of the very few people who admired the university lecturer along with the channel. That's nice!

  • @scarlettefoxx5585
    @scarlettefoxx5585 3 ปีที่แล้ว

    Thanks for helping me with my software technology program

    • @geekific
      @geekific  3 ปีที่แล้ว

      Glad I could help :)

  • @mahrou616
    @mahrou616 ปีที่แล้ว

    nice explanation!

  • @mohammeds6314
    @mohammeds6314 3 ปีที่แล้ว

    keep going , perfect explanation, thanks a lot

    • @geekific
      @geekific  3 ปีที่แล้ว

      Thanks, will do! Glad it was helpful :)

  • @ug_it_english
    @ug_it_english 2 ปีที่แล้ว

    very helpful for concepts on UML class and object diagram. I wonder how to represent method in object diagram, kind of value of method!

    • @geekific
      @geekific  2 ปีที่แล้ว

      Glad it was helpful!

  • @dikshyantauprety4020
    @dikshyantauprety4020 3 ปีที่แล้ว

    Thank you so much, very clear explanation

    • @geekific
      @geekific  3 ปีที่แล้ว

      Glad you liked it :)

  • @ahmedkhaled8825
    @ahmedkhaled8825 10 หลายเดือนก่อน

    nice one

  • @habibdeleonbanos8196
    @habibdeleonbanos8196 3 ปีที่แล้ว

    Great! Thank you so much

    • @geekific
      @geekific  3 ปีที่แล้ว

      Glad you liked it :)

  • @mehdi-vl5nn
    @mehdi-vl5nn 3 ปีที่แล้ว

    perfect explanation

    • @geekific
      @geekific  3 ปีที่แล้ว

      Glad you think so!

    • @mehdi-vl5nn
      @mehdi-vl5nn 2 ปีที่แล้ว

      ​ @Geekific on second thought about the last example, is not right eventually we have to break down many -to -many to one- to -many and we need a middle table

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      @@mehdi-vl5nn You are thinking about it from a DB perspective! But to answer your question, the relation between the middle table and each entity in this case will be one to many, but what about the two outer entities linked via the linking table? it is still a many to many, and that is what we are trying to explain here:) Hope this helps! Cheers!

  • @vikramragunathan6392
    @vikramragunathan6392 4 หลายเดือนก่อน

    Take a bow 😃

  • @ollysalanson9452
    @ollysalanson9452 3 ปีที่แล้ว

    Thank you so much!

    • @geekific
      @geekific  3 ปีที่แล้ว

      No worries! Glad it helped :)

  • @Денис-ж3ф5р
    @Денис-ж3ф5р 3 ปีที่แล้ว

    Cool, man.

  • @sipintarpatrick
    @sipintarpatrick 2 ปีที่แล้ว

    nice video sir, thanks

    • @geekific
      @geekific  2 ปีที่แล้ว

      Glad I could help!

  • @zezo928
    @zezo928 3 ปีที่แล้ว

    In many to many association do we need to Define a new class?

    • @geekific
      @geekific  3 ปีที่แล้ว

      Hello :) Am not sure I really got your question, can you please rephrase it? Sorry.

  • @saweranabi7786
    @saweranabi7786 2 ปีที่แล้ว

    Thank you

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      My pleasure :)

  • @sanjusk4287
    @sanjusk4287 3 ปีที่แล้ว +1

    great thank u

    • @geekific
      @geekific  3 ปีที่แล้ว

      Thanks! You're welcome :)

  • @besz.1218
    @besz.1218 2 ปีที่แล้ว

    magnifique

  • @mhmdsha3ban969
    @mhmdsha3ban969 11 หลายเดือนก่อน

    are you Lebanese bro?

    • @geekific
      @geekific  11 หลายเดือนก่อน

      Yup

  • @vikasa6331
    @vikasa6331 2 ปีที่แล้ว

    Tooo much confusing honestly .....

    • @geekific
      @geekific  2 ปีที่แล้ว +1

      Sorry to read that :/ I'll be more than happy to answer any question you may have in the comments section :)
      Do you mind pointing which parts/topics specifically were confusing to you so we may improve it in future videos? Thanks for your feedback :) Cheers!