سؤال

This image illustrate the UML I must follow in this project.

The problem is, I don't know what means the private parameter "ator" in the arrow. It should be declared in the class Ator or Personagem? I do know that Personagem is a subclass of Ator.

هل كانت مفيدة؟

المحلول

Because the arrow is unidirectional, you can be sure that -ator should be placed just next to the Ator class. This implies that a private attribute ator exists for class Personagem.

Then, from any method in the Personagem class, you can use some code like this.ator.getId()

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top