Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Advanced.DefiningClasses.PokemonTrainer;
- import java.util.ArrayList;
- import java.util.List;
- public class Trainer {
- private int numOfBadges;
- private List<Pokemon> pokemons;
- public Trainer() {
- this.numOfBadges = 0;
- this.pokemons = new ArrayList<>();
- }
- public void addPokemon(Pokemon pokemon) {
- this.pokemons.add(pokemon);
- }
- public void setNumOfBadges() {
- this.numOfBadges++;
- }
- public List<Pokemon> getPokemons() {
- return pokemons;
- }
- public int getNumOfBadges() {
- return numOfBadges;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement