Ay Haga

Submitted by: Submitted by

Views: 170

Words: 605

Pages: 3

Category: Other Topics

Date Submitted: 04/05/2013 04:15 PM

Report This Essay

German University in Cairo Media Engineering and Technology Prof. Dr. Slim Abdennadher Computer Programming Lab, Spring term 2013 League of Legends: Lab Assignment 3 Submission: 1.04.2013 (11:59 pm)

In this last milestone, we will put everything together, and we will handle the different exceptional situations that might happen during the game. Below is a figure showing the hierarchy of the exceptions you should implement. Remember that each exception class should have at least two constructors. One with empty parameters, and another that takes a message. All exceptions should be placed in the package eg.edu.guc.lol.exceptions. Finally, note that LeagueOfLegendsException extends the Exception class.

Follows are some changes that should be made to your already implemented classes.

Champion:

1­ useSkill should account for the heal effect, to heal only allies. The heal value is calculated only based on the magical damage and the ability power. So the total heal value is equal to the ability power of the champion doing the skill with heal effect divided by two in addition to the magical damage of the skill itself. heal value = abilityPower/2 + magical damage 2­ If you try to heal an enemy, a CannotHealEnemyException should be thrown. 3­ If you try to attack an ally, a CannotAttackAllyException should be thrown. 4­ While calculating the heal you should make sure that the health is not more than the max health of the champion. 5­ Make sure that attacking an enemy doesn’t give him more HP. (Think about different cases) 6­ You have to make sure you have enough health/mana to execute a skill. RequirmentsNotMetException should be thrown if it is not the case. 7­ Attacking a dead enemy should not make any effect, so it simply doesn’t happen. A DeadChampionException with an appropriate message Should be thrown if the target is dead. 8­  A champion shouldn’t be able to use a skill if the target champion is not in range of the skill....