Pages

Thursday, September 7, 2017

Uml class Diagram for exam

I started thinking about exam class diagram for my OpenLearning project.
In this project, we need to manage different kinds of Exam.So, what is the best way to design exam class ?

To now I think the design pattern factory is best solution.In the following UML class diagram, we define an abstract class with a createExam() method and we let subclasses to decide about creation.

For example, QcmExamFactory has the responsability to create the correct qcm exam.

There is lot QCM and real exams rules, so it is highly probable that implementation change.Moreover, in this time, there is only three types of exam : test, practice and real.
But I can imagine, it will exist other.That's why, I think the design pattern factory is a good solution.If you aren't agree with me, let me know !







Note : I use draw.io to make this UML picture.

No comments:

Post a Comment

Débutez en crypto-monnaie de manière ludique avec les projets "Move to earn"

Les projets "Move to earn" sont des projets très en vogue en ce moment dans le monde de la crypto-monnaie. Le principe est simple ...