Banking Kata

Credits

Inspired by Sandro Mancuso

Your Task

Your bank is tired of its mainframe COBOL accounting software and they hired both of you for a greenfield project in - what a happy coincidence

  • your favorite programming language!

Your task is to show them that your TDD-fu and your new-age programming language can cope with good ole’ COBOL!

Requirements

Write a class Account that offers the following methods void deposit(int) void withdraw(int) String printStatement()

An example statement would be:

Date        Amount  Balance
24.12.2015   +500      500
23.8.2016    -100      400

Starting Points

C++, C#, Elixir, Java, JavaScript, PHP, Python, Ruby, Scala

Clojure, CoffeeScript, C++, C#, Erlang, Groovy, Intercal, Java, JavaScript, Lisp, PHP, Ruby, Scala