Hello, can I get help with this:
I'm having a problem in java. I've created three arrays, one containing questions to be asked for a quiz and another one containing answer to the questions the last one is to ask questions randomly so I generated numbers from 1-10 randomly. The problem starts when I have to display the question according to the random array. The program only shows one question throughout.
public class Coffeeshop Reciept{
static final double COFFEE = 120.00;
static final double CAKE = 80.00;
String a;
static int numberCOFFEE;
static int numberCAKE;
static double CAKETotal = CAKE_PRICE numberCAKE;
static double COFFEETotal = CHIPS_PRICE numberCAKE;
static double finalTotal = CAKETotal + CAKETotal;
{
}
private static Scanner input;
public static void main(String[] args) {
input = new Scanner(System.in);
System.out.println("Good Day :) Welcome to EMILNACOOL Coffee Shop!");
System.out.println("Coffee 120.00 5% off");
System.out.println("Cake per slice 80.00 5% off");
System.out.println("How many Coffee do you want?");
String numberCOFFEE = input.nextLine();
System.out.println("How many slice of cake?");
String numberCAKE = input.nextLine();
COFFEETotal = COFFEETotal * .95;
CAKETotal = CAKETotal * .95;
COFFEETotal = COFFEETotal;
System.out.println("Your total is: " + finalTotal);
System.out.println("Thank You, Come Again.);
}
}