Question
4. Given the scenario of the preceiding problem, three methods are proposed for the IQuizIO interface: I: ArrayList readQuiz(String filename) II: void writeScores(String studentName, int[]
4. Given the scenario of the preceiding problem, three methods are proposed for the IQuizIO interface:
I: ArrayList readQuiz(String filename)
II: void writeScores(String studentName, int[] scores, String filename)
III: int[] takeQuiz(ArrayList questions)
Which ones would be good choices?
A. I and II
B. I and III
C. II and III
D. All three
=======================================================================================================
5. Given the scenario of the preceding problems, what would be a good implementation for readQuiz method in a MockQuizUI class?
A. readQuiz should be implemented to return null.
B. readQuiz should be implemented to return an empty list.
C. readQuiz should be implemented to return a fixed quiz with a few questions
D. readQuiz should be implemented to read questions from a file provided the file name is quiz.txt
==================================================================================================================
6. Given the scenario of the preceding problems, what would be a good implementations for the writeScores methods in a MockQuizUI class?
A. writeScores should be implemented to do nothing.
B. writeScores should be implemented to write only the name but not the scores of the student
C. writeScores should be implemented to write only the scores but not the name of the student.
D. writeScores should be implemented to write the data only if the file name is scores.txt
======================================================================================================================================
7. Given the scenario of the preceding problems, whati s more useful, an interface IQuizUI with a mock implementation, or an interface IQuizIO with a mock implementation?
A. A mock implemenation for IQuizUI is not as useful because input/output is more difficult to implement than the user interface.
B. A mock implementation for IQuizUI is not as useful because input/output can be implemented without taking quizzes, but the user interface requires obtaining a quiz.
C. A mock implementation for IQuizUI is more useful because the user interface is more difficult to implement than input/output
D. Both interfaces are equally necessary because the work is divided among two programmers.
This is all the information I have in regards to these questions ^
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started