Challenge: Grade System—Stubs and Mocks
Test your understanding of stubs and mocks with a grade system challenge using test-driven development (TDD) with Java.
We'll cover the following
Task and requirements
You’re given a GradesService
class that calculates the average grades for a student. The GradesService
depends on a Gradebook
class, which retrieves the grades for a student. Your task is to write a test for the GradesService
class using a stub to simulate the behavior of the Gradebook
class.
Implement a
GradesService
class with the following method:
Get hands-on with 1400+ tech skills courses.