I created a Class Diagram. This is just a concept but i want to know if the relationship are correct and if i fully understand it.
MainClass
- CreateClassA(); creates ClassA with new ClassA();
- CreateClassB(); creates ClassB with new ClassB();
- getConcreteFromCreator(); get the concrete class from creator. The creator has a switch case to determine which concrete class to return.
- After the class is returned then call it for example (Abstract callConcrete = new ConreateA())
- CreateClassAA(); creates ClassAA with Interface createClassAA = new ClassAA();
ClassAA
- ClassAA creates classBB with new ClassBB();
Relationship from ClassAA to ClassBB is this suppose to be a composition? since the classAA is the creator of ClassBB and it depends on it from existing The relation between InterfaceAA and ClassAA is realization. I wasn't able to draw the line using NClass diagram.
Aucun commentaire:
Enregistrer un commentaire