Question: a Java file for Trainer class that will produce given sample output int money -int potions -int pokeballs - Point loc - Map map Trainer

 a Java file for Trainer class that will produce given sample output

int money -int potions -int pokeballs - Point loc - Map mapTrainer ArrayList pokemon + Trainer(String n, Pokemon p, Map m) +int getMoney)+boolean spend Money(int amt) +void receiveMoney(int amt) +boolean hasPotion() +void receive Potion()+void usePotion(int pokelndex) +boolean hasPokeball() + void receivePokeball Entity String name -inthp -int maxHp + Entity(String n, int mHp) +int getHp0 + intgetMaxHp) +void takeDamage(int d) + void heal() + String getName() + StringtoString() Main + static void Main(String[] args) +static int mainMenu() + staticPokemon choose RandomPokemon() + static void trainerAttack (Trainer t, Pokemon wild) +

int money -int potions -int pokeballs - Point loc - Map map Trainer ArrayList pokemon + Trainer(String n, Pokemon p, Map m) +int getMoney) +boolean spend Money(int amt) +void receiveMoney(int amt) +boolean hasPotion() +void receive Potion() +void usePotion(int pokelndex) +boolean hasPokeball() + void receivePokeball Entity String name -int hp -int maxHp + Entity(String n, int mHp) +int getHp0 + int getMaxHp) +void takeDamage(int d) + void heal() + String getName() + String toString() Main + static void Main(String[] args) +static int mainMenu() + static Pokemon choose RandomPokemon() + static void trainerAttack (Trainer t, Pokemon wild) + static void store(Trainer t) Charmander Charmander +boolean catchPokemon(Pokemon p) Pokemon Ponyta + static final double [][] battleTable = Ponyta {{1,.5,2), (2,1,.5), (.5,2,1}} Squirtle + Pokemon(String n) +Point getLocation() +char goNorth + char goSouth +char goEast) +char goWest) +int getNumPokemon() +void healAllPokemon + Pokemon getPokemon(int index) + String getPokemonList() + String toString() char map - boolean revealed + Map() +void loadMap(int mapNum) +char getCharAtLoc(Point p) String mapToString(Point p) + Point findStart +void reveal(Point p) + void removeCharAtLoc(Point p) + abstract String getSpecial Menu() + abstract int getNumSpecial Menultems() +abstract String specialAttack(Pokemon p, int move) + String getBasicMenu() +int getNumBasicMenuItems() + String basicAttack(Pokemon p, int move) +String getAttackMenu() + int getNumAttack Menultems() +String slam(Pokemon p) + String tackle(Pokemon p) +String punch(Pokemon p) +int getType() | + Squirtled Staryu + Staryu() Bulbasaur Bulbasaur() Oddish + Oddish Fire + String specialMenu = "1. Ember 2. Fire Blast 3. Fire Punch" +int numSpecialMenultems - 3 + String ember(Pokemon p) +String fireBlast(Pokemon p) + String firePunch(Pokemon p) Water String specialMenu "1. Water Gun 2. Bubble Beam 3. Waterfall" +int numSpecialMenultems = 3 + String waterGun(Pokemon p) + String bubbleBeam(Pokemon p) + String waterfall(Pokemon p) Grass + String specialMenu = "1. Vine Whip 2. Razor Leaf 3. Solar Beam" +int numSpecialMenultems = 3 + String vineWhip(Pokemon p) + String razorLeaf(Pokemon p) + String solarBeam(Pokemon p)

Step by Step Solution

3.40 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is a Java implementation of the Trainer class based on the provided sample output import javautilScanner public class Trainer private String nam... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!