Challenge: Grade System - Stubs & Mocks

Test yourself with a grade system challenge using Test-Driven Development (TDD) with Java.

Task and requirements

You are 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 1200+ tech skills courses.