Este script es un programa para preguntarme palabras de francés a mi mismo y me gustaría si se podría hacer una interfaz para el programa, y si se podría como.
import java.util.Scanner;
public class Palabras {
public static void main(String[] args) {
Scanner wordL= new Scanner(System.in);
Scanner wordR = new Scanner(System.in);
Scanner answer= new Scanner(System.in);
System.out.println("Word:");
String wordL1= wordL.nextLine();
System.out.println("Translation:");
String wordR1= wordR.nextLine();
System.out.println("Word:");
String wordL2= wordL.nextLine();
System.out.println("Translation:");
String wordR2= wordR.nextLine();
System.out.println("Word:");
String wordL3= wordL.nextLine();
System.out.println("Translation:");
String wordR3= wordR.nextLine();
System.out.println("Word:");
String wordL4= wordL.nextLine();
System.out.println("Translation:");
String wordR4= wordR.nextLine();
System.out.println(wordL2 + " -> ");
String answer2= answer.nextLine();
if (answer2.equals(wordR2)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println(wordL3 + " -> ");
String answer3= answer.nextLine();
if (answer3.equals(wordR3)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println(wordL4 + " -> ");
String answer4= answer.nextLine();
if (answer4.equals(wordR4)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println(wordL1 + " -> ");
String answer1= answer.nextLine();
if (answer1.equals(wordR1)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println("This was the exam, well done.");
}