Code Monkey home page Code Monkey logo

bankaccountkatanet's Introduction

Bank account kata

Think of your personal bank account experience. When in doubt, go for the simplest solution. Try outside in test driven development.

Requirements

Create a simple banking application with the following features:

  • Deposit into an Account
  • Withdraw from an Account
  • Print a bank statement to the console

Acceptance criteria: Statement should have transactions in the following format:

DATE AMOUNT BALANCE
10/11/2015 500.00 1400.00
02/11/2015 -100.00 900.00
01/11/2015 1000.00 1000.00

Print Statement Acceprace Test

Constrains

Start with a class like this:

public class Account {
    public void Deposit(int amount);
	public void Withdraw(int amount);	
	public void PrintStatement();
}
  1. You can not add other public methods
  2. For simplicity, use strings and integers for dates and amounts
  3. Spaces in formatting can also be ignored

This follows a tutorial from @sandromancuso, see their for other design/implementation constrasins.

For more information:

  • Object Calisthenics pdf
  • Object Calisthenics (full book), Jeff Bay in: The ThoughtWorks Anthology. Pragmatic Bookshelf 2008
  • Original idea for the kata: How Object-Oriented Are You Feeling Today? - Krzysztof Jelski (Session on the Software Craftsmanship UK 2011 conference)
  • Sandro's Kata repository
  • A Java verion

bankaccountkatanet's People

Contributors

robi-y avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.