Giter Site home page Giter Site logo

technicaltest's Introduction

Input/Output

  • The program requires two arguments to be passed when executed: the start date and the full file path of a JSON file containing customer data. program arguments

An example customer.json file can be found in "input.json"

  • The output will be printed to the console, and a file named "output.json" will be created in the directory where the program is running.

Code Overview

  • Program.fs - Contains the main logic for the program. Given the input, it determines the 90-day range and decides which customers should receive a message when.
  • Types.fs - Defines the data types used in the program, including the Customer type and Marketing Preference discriminated union. It also includes logic for parsing JSON data.
  • InputParser.fs - Implements the logic for reading user input (start date and file path).
  • Tests.fs - Includes simple XUnit tests to ensure the main functions are functioning correctly.
  • input.json - An example customer data file.

Assumptions made

  • Customer names are assumed to be unique. If a JSON file contains multiple occurrences of a customer name, only the first occurrence will be included in the processing. This ensures that a customer cannot have conflicting marketing preferences (e.g., "Every Day" and "Never").
  • Customers with invalid day of the week or date of the month values will be ignored during processing.

technicaltest's People

Contributors

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