Olá pessoal, bom dia. O meu código está apresentando um erro de entrada pelo teclado. O meu código segue abaixo:
package General;
import java.util.Scanner;
/**
*
* @author Edisson Sávio de Góes Maciel
* @version 1.0
* @since 11/2022
* This class performs the input of the flow-field variables necessary to run the renecoreflows2d program.
* The input blocks are divided in four groups, involving the general properties, the physical properties,
* the algorithm properties, and the computational properties.
*
*/
public class ReadingData
{ public static void main (String[] args)
{// Reading data
Scanner input = new Scanner (System.in);
ReadingTableProcedure(); }
public static void ReadingTableProcedure()
{// Reading data
String formulation = "";
Scanner input = new Scanner (System.in);
// Building the general property variable
GeneralProperties genprop = new GeneralProperties();
System.out.println("What is the physical formulation? "); // prompt
genprop.setFormulation(input.next());
System.out.println("What is the gas model? "); // prompt
genprop.setGasModel(input.next());
System.out.println("Who is(are) the model author(s)? "); // prompt
genprop.setModelAuthors(input.next());
System.out.println("What is the temperature model? "); // prompt
genprop.setTemperatureModel(input.next());
System.out.println("What is the temperature average type? "); // prompt
genprop.setAverageType(input.next());
System.out.println("What is the type of flow? "); // prompt
genprop.setFlow(input.next());
System.out.println("What is the turbulence model? "); // prompt
genprop.setTurbulence(input.next());
System.out.println("What is the artificial dissipation model? "); // prompt
genprop.setDissipation(input.next());
System.out.println("What is the studied physical problem? "); // prompt
genprop.setProblem(input.next());
System.out.println("What is the convergence acceleration technique? "); // prompt
genprop.setTechnique(input.next());
System.out.println("Do you intends to save the solution in predetermined steps? "); // prompt
genprop.setSaving(input.next());
System.out.println("What is the initial flow condition? "); // prompt
genprop.setInitial(input.next());
System.out.println("How many steps in the Newton-Raphson iteration? "); // prompt
genprop.setNewtonRaphson(input.nextInt());
System.out.println("How many steps in the Jacobi iteration? "); // prompt
genprop.setJacobi(input.nextInt());
System.out.println("How many iterations to save? "); // prompt
genprop.setIterationsToSave(input.nextInt()); } }
What is the physical formulation?
Thermochemical Non-Equilibrium
What is the gas model?
Who is(are) the model author(s)?
Five Species Chemical Model
What is the temperature model?
What is the temperature average type?
What is the type of flow?
What is the turbulence model?
Ele está apresentando a saída acima. Ou seja, ele apresenta a primeira pergunta e eu respondo, em seguida ele apresenta duas perguntas consecutivas e eu responde e ele apresenta quatro perguntas consecutivas. O que eu esperava: uma pergunta por vez e o input após a pergunta. Por favor, dêem uma lida e vejam se podem me ajudar. Muito obrigado, Edisson Sávio.