logo

Crowdly

Classe  Mag  - 0,75 punts Escriu una classe  Mag  que hereti de  Personatg...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

  1. Classe Mag - 0,75 punts

Escriu una classe Mag que hereti de Personatge, tingui l'atribut mana i implementi atacar() així:

  • Si mana >= 5, resta 5 punts de mana i retorna nivell * 3.
  • Si no hi ha prou mana, retorna nivell.

Valida que mana no sigui negatiu.

More questions like this

Want instant access to all verified answers on www.insbaixcamp.cat?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!