Code Monkey home page Code Monkey logo

hrways's Introduction

Welcome to our coding test!

Your solution to this coding test will be evaluated based on its:

  • Adherence to best coding practices
    • Add unit tests that cover the basic features of TransactionDataFetcher. One test per method would be enough
  • Correctness
  • Efficiency

Take your time to fully understand the problem and formulate a plan before starting to code, and don't hesitate to ask any questions if you have doubts.

Objective

Since we are a money transfer company this test will revolve around a (very) simplified transaction model. Our aim is to implement the methods listed in com.smallworld.TransactionDataFetcher, a component that allows us to get some insight into the transactions our system has.

A battery of test transactions is stored in transactions.json that is going to be used as a datasource for all our data mapping needs.

Each entry in transactions.json consists of:

  • mtn: unique identifier of the transaction
  • amount
  • senderFullName, senderAge: sender information
  • beneficiaryFullName, beneficiaryAge: beneficiary information
  • issueId, issueSolved, issueMessage: issue information. Transactions can:
    • Contain no issues: in this case, issueId = null.
    • Contain a list of issues: in this case, the transaction information will be repeated in different entries in transactions.json changing the issue related information.

You can think of the json as the output of an SQL query joining transaction with transaction_issue, so the following example would represent a unique transaction with 2 issues:

{
    "mtn": 1284564,
    "amount": 150.2,
    "senderFullName": "Tom Shelby",
    "senderAge": 22,
    "beneficiaryFullName": "Arthur Shelby",
    "beneficiaryAge": 60,
    "issueId": 2,
    "issueSolved": true,
    "issueMessage": "Never gonna give you up"
  },
  {
    "mtn": 1284564,
    "amount": 150.2,
    "senderFullName": "Tom Shelby",
    "senderAge": 22,
    "beneficiaryFullName": "Arthur Shelby",
    "beneficiaryAge": 60,
    "issueId": 3,
    "issueSolved": false,
    "issueMessage": "Looks like money laundering"
  }

Each method to be implemented includes a brief description of what's expected of it.

The parameters and return types of each method can be modified to fit the model that contains the transaction information

Have fun!

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.