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
What is a computer modem?​
ahrayia [7]

Answer:

A modem modulates and demodulates electrical signals sent through phone lines, coaxial cables, or other types of wiring.

8 0
3 years ago
Which library research databases include information about articles published in magazines, journals, and newspapers? question 1
Alecsey [184]

Answer:

periodical databases

Explanation:

Among the various databases you can now access in a library, the periodical databases contains the text and other information about articles published in magazines, journal and newspapers.

This database allows you for example to easily search for all articles written about a specific event or person, and it will return you the list of articles you can then read from a single spot, no matter where or when the article was written.

8 0
3 years ago
Einstein's famous equation states that the energy in an object at rest equals its mass times the squar of the speed of light. (T
musickatia [10]

Answer:

The complete program is as follows:

m_str = input('Input m: ')

mass = float(m_str)

e = mass * 300000000**2

print("e = ",e)

Explanation:

This is an unchanged part of the program

m_str = input('Input m: ')

This converts m_str to float

mass = float(m_str)

This calculates the energy, e

e = mass * 300000000**2

This is an unchanged part of the program

print("e = ",e)

4 0
3 years ago
Which commas is used to combine two or more cells together into one cell
AURORKA [14]
The command is Merge & Center
This command could be easily found in the toolbar of your excel.
If you execute this command in two different cells, those cells will be merged into one larger cell and the content in that cells will be placed exactly in the middle of the combined cell (measures according to combined cells' length)
5 0
3 years ago
Which one of the following items would you be most likely to keep in a database? A. Payroll records B. Address book C. Financial
True [87]
The item that you would most likely to keep in a database is a Payroll record. Payroll records are numbers and inputs/outputs of employees of a certain company. Numbers are easier to manipulate and easier to manage than statements, letters and addresses that are basically letters.
3 0
3 years ago
Other questions:
  • The term ________ refers to the use of a single unifying device that handles media, internet, entertainment, and telephone needs
    13·1 answer
  • Look at the slide. How could the slide best be improved? By reducing the number of visual aids by increasing the font size by da
    8·2 answers
  • Explain how Deep Packet Inspection works (DPI). How is this technology beneficial to Perimeter Security? Lastly, describe a scen
    6·1 answer
  • Nina aspires to be a digital media specialist. What should Nana be familiar with in order to pursue this career?
    9·2 answers
  • Which of the following will you select as X in the following series of clicks to lay the title over a chart: Chart Title box &gt
    14·1 answer
  • What is anatomy of software house?
    10·1 answer
  • Select the correct answer.
    15·1 answer
  • What is alfred anderson in creole?
    6·1 answer
  • . A store offers a deposit of 6% on the cash price of $462. The deposit amount is?​
    6·1 answer
  • Q.3.1 Explain why devices on a network need addresses. (5)​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!