Sha256: bf4c57c17f89e3f5dabba0e23d3ed5e5f597fbbcf3466d4850472baefcfd5942

Contents?: true

Size: 717 Bytes

Versions: 71

Compression:

Stored size: 717 Bytes

Contents

class BankAccount {

    // You cannot do any operations before you open the account.
    // An account opens with a balance of 0
    // You can reopen an account
    void open(){         
    } 

    // you cannot do any operations after you close the account
    void close() { 
    }

    // this should increment the balance
    // you cannot deposit into a closed account
    // you cannot deposit a negative amount 
    void deposit(int amount) {
    }

    // this should decrement the balance
    // you cannot withdraw into a closed account
    // you cannot withdraw a negative amount 
    void withdraw(int amount) {
    }

    // returns the current balance
    int getBalance(){
        return 0
    }

}

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.179 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.178 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.177 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.176 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.175 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.174 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.173 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.172 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.171 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.170 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.169 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.167 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.166 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.165 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.164 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.163 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.162 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.161 tracks/groovy/exercises/bank-account/BankAccount.groovy
trackler-2.2.1.160 tracks/groovy/exercises/bank-account/BankAccount.groovy