There is a program:
The user selects a hare from 5 options and puts it on the field. On the field wolves come and attack hares. Roughly speaking, as in Plants VS Zombie
There is a class diagram. On it you need to show how wolves and hares interact.
About hares: their five types

  1. Hare ranged - launches a projectile in the wolf
  2. Hare melee - fighting with a wolf in melee (yes really?)
  3. Hare-getter - from time to time it extracts carrots (currency for buying hares)
  4. Weak defender - acts as a weak wall
  5. Strong defender - acts as a strong wall

About wolves: four of them

  1. Weak warrior
  2. Average warrior
  3. Strong warrior
  4. Boss

The diagram shows that all wolves can differ only in speed and type
Actually, the problem is: I don’t know what connections need to be added to the diagram for the interaction of wolves and hares Class diagram

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants aleksandr barakin , D-side , zRrr , user194374, Streletz 18 Jun '16 at 7:42 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • maybe they are already enough, and it's time to write the code? - strangeqargo 4:16 pm
  • @strangeqargo is the problem: they said it was not enough - andrew
  • Specify what the receiver is waiting for. - Monk
  • @Monk want to see connections between wolves and hares - andrew
  • You definitely do not need classes of wolves, if they differ only in parameters, but not functions. Remove them :) This is what can be said on the class diagram. What kind of interaction of wolves and hares is not clear, t.ch. what to add is also not clear. Perhaps the methods in the style of hit(TRabbit*) in the wolf, and similar in the hare? With the ability to determine the level of damage by the type of the striker and his target and execute it. - Arkady

0