SHARE
TWEET

Untitled

a guest Jun 10th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Advanced.DefiningClasses.PokemonTrainer;
  2.  
  3. public class Pokemon {
  4.     private String name;
  5.     private String element;
  6.     private int health;
  7.  
  8.     public Pokemon(String name, String element, int health) {
  9.         this.name = name;
  10.         this.element = element;
  11.         this.health = health;
  12.     }
  13.  
  14.  
  15.     public String getElement() {
  16.         return element;
  17.     }
  18.  
  19.     public void lowerHealth() {
  20.         this.health -= 10;
  21.     }
  22.  
  23.     public int getHealth() {
  24.         return health;
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top