[SOLVED] JUnit Test Classes

15.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (6 votes)

You will be creating a JUnit Test Class for Gradebook.java, that has been provided for you. 1. Add a getScoreSize() method to the Gradebook class which returns scoresSize; 2. Add a toString() method to the Gradebook class that returns a string with each score in scores separated by a space. Create the Test Class GradebookTester. 1. Select the setUp and tearDown method. 2. Select all of the methods of Gradebook, except for the constructor to create tests for. 3. In the setUp method of GradebookTester, create at least two objects of Gradebook of size5. Call the addScore method for each of the Gradebook classes at least twice (but no more than 5 times). 4. In the teardown method of GradebookTester, set the two objects of Gradebook to null; 5. Create test for the methods of Gradebook: a. addScore a.i. Use the toString method to compare the contents of what is in the scores array vs. what is expected to be in the scores array

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.