Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I think that I do not specify what I want is to choose any of these two pokemons the problem is that it only lets

I think that I do not specify what I want is to choose any of these two pokemons the problem is that it only lets me choose a charmander when I choose Pikachu stops working the program and pulls me that the error occurred where is the code enclosed by the I do not know what to do, please I need your help as it is urgent

image text in transcribed

image text in transcribed

public class entrenador int cont-0, tam-1l: private String nombre: private vector mochila-new Vectorpokemon(); //Esta arte es la que no quiere el aux private pokemon[ mochilanew pokemon [tam]://el vector que hic scanner in = new scanner (System.in); /Constructor //se genera de torma aleanew scanner (System.in) /Constzuctortoria un tipo de Pokemon en funcion del numero aux aleatorib //dentro del constructor public entrenador (String nombre) ( System.out.println System.out.printin("1. Charmander " + "2. Bulbasur " + "3. Squirleln" + *4. Picachu In" +"Please enter your choice[1-41 int aux -in.nextIntO la hora de declazar el vector y usarlo aquie y ejecutar el rogama no me lo hagarra switch (aux) t case 1: mochila [01 new charmander ) break; case 2: mochila [2- new Pikachu () break public pokemon elige (int ){ if (i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions

Question

The amount of work I am asked to do is reasonable.

Answered: 1 week ago

Question

The company encourages a balance between work and personal life.

Answered: 1 week ago