nus-cs2103-AY1920S1 / forum

Forum
1 stars 1 forks source link

Encapsulated HashMap in Class Diagram #153

Open DivineDX opened 5 years ago

DivineDX commented 5 years ago

As stated in the title, how do I show an Encapsulated Hashmap in a Class Diagram?

I have an Object Foo that contains a HashMap<Bar, Baz>. How do I represent this as a class diagram? I can't seem to find a proper relevant example in the textbook, and from searching online, the best answer I seem to get is from here, but I have not seen that style discussed/mentioned before.

damithc commented 5 years ago

@DivineDX that notations is not in scope of the UML covered in the module. I suggest you omit such Collections classes from the diagram or show them as normal classes. If the mapping information is critical to the diagram, you can use a UML note to add that information.