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