classumldiagramgeneralization

UML class diagram when templated forms are involved


I'm learning UML diagramming and I am bit confused how to draw the class diagram for my problem

My questions:

enter image description here


Solution

  • This diagram is not wrong. I wonder however if there shouldn't be an association between the user form and the cloned template form.

    There is an open question about whether a form template is also a form. Your short narrative seems to assume this. Another alternative could be to not let inherit FormTemplate from Form, but to prefer composition, by associating a Form to the FormTemplate. The cloning of a user form would then clone only the form information of the template and not the metadata that is only relevant for the template.