Made interfaces and impl classes for each of QuizDatabase, QueAndAns and
Quiz Service/Server.
Created empty JUnit tests for QuizServer, QuizDatabaseImpl and
QueAndAnsImpl.
Javadoc for generateQueAndAnsList(), composeQuestionIndices(int) and
composeFalseAnswer().
Member fields: int questionListIndex, int countryListIndex, int[]
que_AnsList and QuizDatabase database.
Member fields: String[] questionList, String[] countryList, int[][]
answerList, int questionListLength, int countryListLength
Member fields: int score, int totalNoOfQuestions, int
noOfAnswersPerQuestion and QueAndAns[] listOfQAndALists
Javadoc QuizService
testGetQuestion(int) written to fail.
testGetQuestion() written to pass.
testGetCountry() passes.
Added isNicelyDistributed(int) and getMaxInRange(). Javadoc.
Added getter for que_AnsList
Made isNicelyDistributed(int) and getMaxInRange() private.
Deleted isNicelyDistributed(int) and getMaxInRange() from interface.
(These methods were made private in implementation class).
composeQuestionIndices(int) and composeFalseAnswer() made private.
Javadoc.
Deleted composeQuestionIndices(int) and composeFalseAnswer(). (These
methods were made private in the implementing class).
testGenerateQueAndAnsList() written. Simply tests that the array is
initialised and contains non-zero values throughout.
testGetMaxInRange() written first (before testIsNicelyDistributed() as
isNicelyDistributed() calls getMaxInRange())
testIsNicelyDistributed() written before testComposeFalseAnswer() (as
composeFalseAnswer() calls isNicelyDistributed(int)).
Added privat method roundOff(int). Javadoc.