From 223567f4f88759d423f1cf2de318959bc1ef0a8b Mon Sep 17 00:00:00 2001 From: "antoine.vinot" Date: Tue, 17 Oct 2023 11:18:00 +0200 Subject: [PATCH] Add pokemon class --- src/main/java/test/Pokemon.java | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/main/java/test/Pokemon.java diff --git a/src/main/java/test/Pokemon.java b/src/main/java/test/Pokemon.java new file mode 100644 index 0000000..3894d00 --- /dev/null +++ b/src/main/java/test/Pokemon.java @@ -0,0 +1,41 @@ +package test; + +public abstract class Pokemon { + private String name; + private String type; + private int level; + + public Pokemon(String name, String type, int level) { + this.name = name; + this.type = type; + this.level = level; + } + + public String getName() { + return name; + } + + public String getType() { + return type; + } + + public int getLevel() { + return level; + } + + public void setName(String name) { + this.name = name; + } + + public void setType(String type) { + this.type = type; + } + + public void setLevel(int level) { + this.level = level; + } + + public String toString() { + return "Pokemon: " + name + " " + type + " " + level; + } +}