Question

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.

Was it helpful?

Solution

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()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top