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