Course Solutions Uncategorized (Solved) : Fix Program Code Please Thank 1 File Driverexamdemojava 2 Import Javautilscanner 3 Drivere Q28918368 . . . .

(Solved) : Fix Program Code Please Thank 1 File Driverexamdemojava 2 Import Javautilscanner 3 Drivere Q28918368 . . . .

 

Can you fix my program code please! thank you

1 //File:DriverExamDemo.java
2 import java.util.Scanner;
3 //DriverExam class impplementation
4 class DriverExam
5 {
6 //create an array for correct answers
7 private String[]correctAnswers={“B”,”D”,”A”,”A”,”C”,”A”,”B”,”A”,”C”,”D”,”A”,
8 “D”,”C”,”C”,”B”,”D”,”A”};
9 //create an array for student’s correctAnswers
10 private String[]studentAnswers;
11 //default constructor impplementation
12 public DriverExam()
13 {
14 studentAnswers= new String[20];
15 for(int i=0;i<20;i++)
16 studentAnswers[i]=””;
17 }
18 //parameterized constructor impplementation
19 public DriverExam(String[]userAnswers)
20 {
21 studentAnswers= new String[userAnswers.length];
22 for(int i=0; i 23 {
24 studentAnswers[i]=userAnswers[i];
25 }
26 }
27 //passed method impplementation
28 //it return true if the student passed the exam,
29 //or false otherwise.
30 public boolean passed()
31 {
32 //verify whether the studet answered 15
33 //or more correctly
34 if(totalCorrect()>=15)
35 return true;
36

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post