jwrbg

Untitled

Jun 10th, 2019
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. package PokemonTrainer;
  2.  
  3. public class Trainer {
  4.     private String name;
  5.     private int numBadges;
  6.     private int pokemonCollections;
  7.  
  8.     public Trainer(String name,int numBadges,int pokemonCollections){
  9.         this.name=name;
  10.         this.numBadges=numBadges;
  11.         this.pokemonCollections=pokemonCollections;
  12.     }
  13.     public String getName(){
  14.         return this.name=name;
  15.     }
  16.  
  17.     public int getNumBadges() {
  18.         return numBadges;
  19.     }
  20.     public void setNumBadges(){
  21.         this.numBadges++;
  22.     }
  23.     public void setPokemonCollections(int pokemonCollections){
  24.         this.pokemonCollections=pokemonCollections;
  25.     }
  26.  
  27.     public int getPokemonCollections() {
  28.         return pokemonCollections;
  29.     }
  30. }
Add Comment
Please, Sign In to add comment