glarimy / glarimy-quiz-app

The source code and resources for Glarimy Quiz community project
0 stars 0 forks source link

Implement com.glarimy.quiz.SimpleScoringService #22

Closed glarimy closed 6 years ago

glarimy commented 6 years ago

Implement the SimpleScoringService and make sure that all the test cases are passing.

glarimy commented 6 years ago

Complete this task by CoB tomorrow!

venumittapalli576 commented 6 years ago

Implemented simplescoringservice and checked in the code

glarimy commented 6 years ago

Review comment 1: The method evaluate() is only checking the correctness of the ticked option. It must also update the current score.

Review comment 2: The method getCurrentScore() is supposed to just return the current score.

Refactor the code based on the above comments and check it in.

venumittapalli576 commented 6 years ago

Refactored the code of simplescoringservice

glarimy commented 6 years ago

Good job.

glarimy commented 6 years ago

Found a problem with your code. The currentScore property is being used at lines 22, 23, 27 and 28 without initialization. It leads to nullpointerexception. Please initialize the currentScore to new Score() in the contructor of SimpleScoringService.

venumittapalli576 commented 6 years ago

k sir i am working on it

venumittapalli576 commented 6 years ago

completed and checked in the code

glarimy commented 6 years ago

Thanks!