License Exam
The Yuba City driver's license office has asked you to create an application that grades the written portion of the drivers license examination. The exam has 15 multiple-choice questions. Here are the correct answers
(You may create your own correct answers if you like)
B 2. D 3. A 4. A 5. C
A 7. B 8. A 9. C 10. D
B 12. C 13. D 14. A 15. F
A student must correctly answer 10 of the 15 questions to pass the exam.
Write a class named DriverExam that holds the correct answers to the exam in an array. The class should also have an array that holds the student's answers. The following methods should be provided.
Passed Returns true of the student passes or false if the student fails
totalCorrect Returns the total correctly answered.
totalIncorrect Returns the total incorrectly answered.
questionsMissed Returns an array containing the missed questions.
YourScore Returns the percentage correct.
Valid input: Only the letters A, B, C, or D are acceptable answers to questions.