Вопрос

my question is in relation to operations on a class diagram.

I'm very new to UML and I am creating a class diagram for an online quiz system where a teacher will assign login details to a student, the teacher will create a multiple choice quiz and then from a specified time, students can log in to complete the quiz.

My question is in relation to the operations included. For example, the teacher will add a 'QuizQuestion'. So can I include the operation 'addQuizQuestion()' in the 'Teacher' class as the 'Teacher' will perform the task or shall I add it to the 'QuizQuestion' class as it is what is being created?

Similary, once results have been collated, reports are generated and sent out to parents. So shall I have a 'receiveReport()' operation in the 'Parent' class or should there be a 'sendReport()' operation in the 'Report' class?

I'm so confused!!

Thanks

Это было полезно?

Решение

Your confusion has nothing to do with diagramming and everything to do with basic object oriented concepts such as in your particular case, roles and responsibilities. I think you would do yourself (and your teacher) a favor by reading a book on this topic such as Object Design: Roles, Responsibilities, and Collaborations or a more general OO book such as The Object-Oriented Thought Process, before embarking on this project.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top