Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Created November 16, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trikitrok/75324ec2db56601f3d62b39dd5f08e40 to your computer and use it in GitHub Desktop.
Save trikitrok/75324ec2db56601f3d62b39dd5f08e40 to your computer and use it in GitHub Desktop.

Fractions Kata

Goal

Write a program that implements the addition of fractions.

Constraints

A fraction is a value object, once created it can't be mutated.

The add method must return a new Fraction object.

Fractions must be reduced. We'll provide an implementation of the greatest common divisor computation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment