a pastebin project

Someone

  1. //Java Fighters Universe v2007
  2. //the second homework_ism001
  3. //by LAW MEI KWAN 8048955
  4. //2007-12-10
  5.  
  6. public class BossPlayer extends Player
  7. {
  8.         //calls the constructor of its superclass to initialize the name
  9.         public BossPlayer(String playerName)
  10.         {
  11.                super(playerName);
  12.         }
  13.  
  14.         //updates the power of the boss player
  15.         public void setPlayerPower(int PlayerPower,int Difference)
  16.         {
  17.            
  18.                 if (Difference<0)
  19.                 this.playerPower += (Difference/2);//subtracts half the power difference
  20.                 else
  21.                 this.playerPower += (Difference*2);//adds double the power difference
  22.         }
  23. }//end class BossPlayer

advertising

Create a Paste

Please enter your new post below (or upload a file instead):





Please note that information posted here will not expire by default. If you want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords.

fantasy-obligation