a pastebin project

Something

  1. public class BossPlayer extends Player
  2. {
  3.        
  4.         public BossPlayer(String name)
  5.         {
  6.                 //send the (name) back to the super class(Player)
  7.                 super(name);
  8.         }
  9.         public void setPower(int Power,int Difference)
  10.         {
  11.                 //overwrite setPower method because BossPlayer is stronger           
  12.                 if (Difference<0)
  13.                 this.Power=(Power+(Difference/2));
  14.                 else
  15.                 this.Power=(Power+(Difference*2));
  16.         }
  17. }

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.

worth-right