Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Someone
Tuesday, December 11th, 2007 at 11:32:31pm MST 

  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

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not 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. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
worth-right
fantasy-obligation