GithubHelp home page GithubHelp logo

bank-tech-test's Introduction

Bank Tech Test

Requirements

  • You should be able to interact with your code via a REPL like IRB or Node.
  • Deposits, withdrawal.
  • Account statement (date, amount, balance) printing.
  • Data can be kept in memory (it doesn't need to be stored to a database or anything).

User stories

As a customer So that I can view my balance I want to be able to see my print my initial balance on a statement

As a customer So that I can add money to my account I want to be able to deposit money into my bank

As a customer So that I can spend my money I want to be able to withdraw money from my bank account

As a customer So that I know when I made a transaction I want to be able to view my statement with the correct dates

Acceptance Criteria

Given a client makes a deposit of 1000 on 10-01-2023 And a deposit of 2000 on 13-01-2023 And a withdrawal of 500 on 14-01-2023 When she prints her bank statement Then she would see

date || credit || debit || balance
14/01/2023 || || 500.00 || 2500.00
13/01/2023 || 2000.00 || || 3000.00
10/01/2023 || 1000.00 || || 1000.00

Getting Started

Prerequisites

To run this project, you will need to have the following installed on your system:

Node.js: You can download and install the latest version of Node.js from the official website at https://nodejs.org/en/. Make sure to select the appropriate version based on your operating system.

NVM (Node Version Manager): NVM is a version manager for Node.js, which allows you to easily switch between different versions of Node.js on your system. To install NVM, you can follow the instructions provided in the official documentation at https://github.com/nvm-sh/nvm#installation-and-update.

Installation

To get started with this project, you will need to clone the repository and navigate into the project directory. Here's how:

  • Open your terminal and navigate to the directory where you want to clone the repository.
  • Clone the repository by running the following command:
git clone https://github.com/edwardfgt/bank-tech-test
  • Navigate into the project directory by running the following command:
cd bank-tech-test

Running tests

This project uses Jest for testing. To run all tests, run the following command

jest

Example

Here is an example of how you could run this program.

const BankAccount = require('./bankAccount')
let bankAccount = new BankAccount();
bankAccount.deposit(100);
bankAccount.deposit(500);
bankAccount.withdraw(50);
bankAccount.getStatement();

Expected return

date || credit || debit || balance
22/03/23 || || 50.00 || 550.00
22/03/23 || 500.00 || || 600.00
22/03/23 || 100.00 || || 100.00

Screenshot 2023-03-22 at 12 43 07

bank-tech-test's People

Contributors

edwardfgt 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.