Advertisement
hikipedia

Pokemon.java

Nov 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.03 KB | None | 0 0
  1. package Pokedex;
  2.  
  3. public abstract class Pokemon {
  4.     private String name;
  5.     private String type;
  6.     private String movePool;
  7.     public Pokemon(){
  8.         this.name = "noName";
  9.         this.type = "noType";
  10.         this.movePool = "noMove";
  11.     }
  12.     public Pokemon(String name, String type, String movePool){
  13.         this.name = name;
  14.         this.type = type;
  15.         this.movePool = movePool;
  16.     }
  17.     public void attack(){
  18.         System.out.println(name + " used " + movePool);
  19.         System.out.println();
  20.     }
  21.     public void talk(){
  22.         System.out.println(name + "! ");
  23.     }
  24.  
  25.     public String getName(){
  26.         return this.name;
  27.     }
  28.     public String getType(){
  29.         return this.type;
  30.     }
  31.     public String movePool(){
  32.         return this.movePool;
  33.     }
  34.     public void setName(String name){
  35.         this.name = name;
  36.     }
  37.     public void setType(String type){
  38.         this.type = type;
  39.     }
  40.     public void setMovePool(String movePool){
  41.         this.movePool = movePool;
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement