Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top