this practcie assignment wants me to Write an application that contains an array of 10 multiple-choice quiz questions related to your favorite hobby. Each question contains three answer choices. Also create an array that holds the correct answer to each question—A, B, or C. Display each question and verify that the user enters only A, B, or C as the answer—if not, keep prompting the user until a valid response is entered. If the user responds to a question correctly, display Correct!; otherwise, display The correct answer is and the letter of the correct answer. After the user answers all the questions, display the number of correct and incorrect answers . how do i create arrays help!! here is my code that i have so far : import java util.Scanner; public class Quiz { public static void main(String[] args) { Scanner input = new Scanner(System.in);
this practcie assignment wants me to Write an application that contains an array of 10 multiple-choice quiz questions related to your favorite hobby. Each question contains three answer choices. Also create an array that holds the correct answer to each question—A, B, or C. Display each question and verify that the user enters only A, B, or C as the answer—if not, keep prompting the user until a valid response is entered. If the user responds to a question correctly, display Correct!; otherwise, display The correct answer is and the letter of the correct answer. After the user answers all the questions, display the number of correct and incorrect answers .
how do i create arrays help!!
here is my code that i have so far :
import java util.Scanner;
public class Quiz {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("What is my favorite hobby?\n" + "(a)hair\n(b)makeup\n(c)both a and b\n");
System.out.println("Who first discovered makeup?\n" +"(a)Egyptians\n(b)haitians\n(c)Africans");
System.out.println("What glue is best to use when laying down a frontal?\n" + "(a)ghostbond\n(b)boldHold\n(c)Got2b\n");
System.out.println("How many layers of glue do you need before applying a wig onto your head?\n" + "(a)3\n(b)4\n(c)1\n");
System.out.println("Always get a shade lighter than your skin when using\n" + "(a)concealer\n(b)contour\n(c)foundation\n");
System.out.println("What type of makeup brush would you use to blend your foundation?\n" + "(a)powder brush\n(b)body brush\n(c)neither\n");
System.out.println("How lond do you suppose to keep a lace front wig installment in your head?\n" + "(a)4 weeks\n(b)2-3 weeks\n(c)5 weeks\n");
System.out.println("What do you use to remove makeup off your face?\n" + "(a)baby wipes\n(b)Neutrogena Cleansing towlettes\n(c)clorox wipes\n");
System.out.println("How do you remove lace glue from your hair?\n" + "(a)alcohol\n(b)shampoo\n(c)water\n");
System.out.println("When did the early Egyptians contrust their first wig?\n" + "(a)2700 B.C.E\n(b)2400 B.C.E\n(c)2500 B.C.E\n");
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images