Fizzbuzz with Java

Fizzbuzz is a code kata, a simple coding challenge where the goal of this kata is to learn the java programming languange, using test driven development (TDD) with Junit5. The task was to create a simple program/algorithm with the following specifications:

  • The program can be passed a number.
  • When passed a number that is a multiple of 3, the program returns the message 'Fizz'.
  • When passed a number that is a multiple of 5, the program returns the message 'Buzz'.
  • When passed a number that is a multiple of both 3 and 5, the program ignores the previous 2 rules and returns the message 'Fizzbuzz'.
  • In all other cases, the program simply returns the given number.

FizzBuzz task completed with all unit tests passing/green.