1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marianna [84]
3 years ago
9

Driver’s License Exam The local driver’s license office has asked you to create an application that grades the written portion o

f the driver’s license exam. The exam has 20 multiple-choice questions. Here are the correct answers: 1. A 6. B 11. A 16. C 2. C 7. C 12. D 17. B 3. A 8. A 13. C 18. B 4. A 9. C 14. A 19. D 5. D 10. B 15. D 20. A Your program should store these correct answers in a list. The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another list.
Computers and Technology
1 answer:
Aleks04 [339]3 years ago
3 0

Driver’s License Exam The local driver’s license office has asked you to create an application that grades the written portion of the driver’s license exam.

Explanation:

  • The exam has 20 multiple-choice questions. Here are the correct answers: 1. A 6. B 11. A 16. C 2. C 7. C 12. D 17. B 3. A 8. A 13. C 18. B 4. A 9. C 14. A 19. D 5. D 10. B 15. D 20. A Your program should store these correct answers in a list.
  • The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another list.

import java.util.*;

class DriverExam{

char[] answer = new char[]{ 'B','D','A','A','C','A','B','A','C','D','B','C','D','A','D','C','C','B','D','A'};

int correct=0,inCorrect=0;

int[] missed = new int[20];

boolean passed(){

if(this.correct >= 15){

return true;

}

return false;

}

int totalCorrect(){

return this.correct;  

}

int totalIncorrect(){

return this.inCorrect;

}

int[] questionsMissed(){

return this.missed;

}

}

public class Main

{

  public static void main(String[] args) {

  Scanner in = new Scanner(System.in);

      System.out.println("Input : A,B,C,D");

System.out.println("Note : Any other inputs will result in skipping that question");

      DriverExam exam = new DriverExam();

      int i,missedIndex=0;

      for(i=0;i<20;i++){

      System.out.print("Answer "+(i+1)+" : ");

      char check = in.next().charAt(0);

      if(exam.answer[i]==check){

      (exam.correct)++;

      }

You might be interested in
Assume that you are testing the Orders database introduced in Watt (2014) - Appendix C. Discuss the problems and possible conseq
madreJ [45]

Answer:

129 \frac{2}{?} 23.4. \div 164 \times 5y1 + . \\ .00487ggh

6 0
3 years ago
If you see these REPORT.
Alenkinab [10]

Answer:

ok will do

Explanation:

3 0
2 years ago
Read 2 more answers
Can i get any information on this website i'd like to know what its for ?
zloy xaker [14]

Explanation: torsearch.org is a safe search engine mainly used for dark wed purposes. It does not track your location nor give any personal information.

8 0
2 years ago
If wearing protective gloves, there's no need to wash your hands after exposure to blood.
Nataliya [291]

Answer:

No, still wash hands

Explanation:

5 0
2 years ago
For some reason my code is not printing in python. It doesn't give me an error is just not printing no thing shows up
svetoff [14.1K]

Answer:

Whats python? i might be able to help

Explanation:

5 0
3 years ago
Other questions:
  • ________ is a method for addressing, creating, updating, or querying relational databases.
    9·1 answer
  • Which computer applications can Mr. Crowell use to make the classroom learning more stimulating and interesting? Mr. Crowell has
    9·2 answers
  • Sorry to bother you guys but for some reason it wont let me comment. How can i fix this?
    5·2 answers
  • If you have a document that is relevant to more than one folder in your computer what should you do?
    8·1 answer
  • Which of the following best describes the purpose of a design specification?
    14·2 answers
  • Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.
    12·1 answer
  • create a function that has an argument is the triple jump distance. It returns the estimate of vertical jump height. The world r
    8·1 answer
  • Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input
    5·1 answer
  • I need help NOW with my java script!! 1. What will the code below output to the console and why? const person = {
    9·1 answer
  • Shandra recently bought a brand-new digital camera from a local camera shop but when she got it home, she noticed the lens was j
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!