Skip to content

Instantly share code, notes, and snippets.

@PavelPolyakov
Last active January 24, 2019 05:40
Show Gist options
  • Save PavelPolyakov/98a619238577b4d0acab770554b0724a to your computer and use it in GitHub Desktop.
Save PavelPolyakov/98a619238577b4d0acab770554b0724a to your computer and use it in GitHub Desktop.
javascript-credit-app-prototype.md

You need to design and prototype a simple project (source code) which serves the process of a customer applying the credit.

The process consists from next steps:

  1. A customer comes to the decision engine in order to apply for the credit. To apply for the credit the next information should be passed:
    • firstname
    • lastname
    • id number
    • amount applied
  2. Decision engine starts from the scoring process. Depending on the results it decides what type of a credit customer can receive.
    • There are three possible outcomes for the scoring:
      • long term credit
      • short term credit
      • rejection (meaning we don't want to give any type of the credit)
    • In this prototype scoring defines the result randomly
    • scoring returns the decision as string
  3. As the result of the application, decision engine should return one of the credits or null, in case the customer was rejected.

Notes:

  • There can be only one decision engine at any time in the company.
  • Customer applies for the credit via the same interface each time, it doesn't depend from credit type which we receive as result.
  • You can use any 3rd party javascript libraries
  • Solution should be prototyped in the single .js file
  • In order to output the results the console.log should be used
  • Please, paste your solution to this sheet, after you think it is done. You are more then welcome to use it during the development.

Next entities should be present:

  • Customer
  • Credit (two types - "Long term credit" and "Short term credit")
  • Scoring, which identifies if the customer receives any credit
  • Decision engine, in order to apply for the credit by the customer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment