Skip to content

adityapant1286/FraudIdentifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fraud Identifier

This program reads Credit Card transactions from a CSV file and identifies whether any credit card numbers are fraudulent as per below criteria.

Criteria

The total transaction amount on a day is greater than the given threshold value.

Example

Credit Card CC0001 total transaction value > 50 on a given date, then CC0001 will be displayed in the output.

Valid CSV Sample Data

Only non-empty data will be considered, and the date format matches to ISO standard.

Sample test data file is present in src/test/resources/testData.csv

CCNumber TransactionDate Amount
CC0001 2020-12-16T10:50:00 10.00
CC0002 2020-12-16T10:50:00 15.50
CC0003 2020-12-16T10:50:00 23.70
CC0004 2020-12-16T10:50:00 43
CC0004 2020-12-16T10:50:10 125.74

Build

  • Clone the repository
  • Open terminal/command prompt and navigate to the FraudIdentifier directory
  • Run mvn clean install command in terminal to build the Jar
  • This will download dependencies and generate a Jar file in the target folder

Note: On macOS the built Jar may require copying to another directory

Test

Valid Input
Param Type Position Required
Threshold Amount Decimal 0 Yes
Path to CSV File String 1 Yes
Transaction Date Date in ISO format (YYYY-MM-dd) 2 Optional (Default today will be used)
Show CSV errors Boolean 3 Optional (Default false)
  • Open terminal/command prompt and navigate to the directory where the Jar file has been generated in the build step
  • Run following command with valid parameters

java -jar FraudIdentifier-1.0.jar [Threshold Amount] [Path to CSV File] [Transaction Date] [Show Errors]

Tools and Libraries

Library Purpose
Lombok Generates setter, getter, builder for an annotated class
JUnit Unit testing

Known Issue

Area of Improvements

  • Implementing a rule engine will allow defining business rules
  • Implementing caching will improve search functionality
  • Large volume can be handled efficiently using MapDB or similar library. https://github.com/jankotek/MapDB

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages