Code Monkey home page Code Monkey logo

ds-test's Introduction

Digital Space Software Candidate Challenge

Attempts to solve the problem outlined in dscs-software-candidate-challenge.pdf

How to run

To run this program, you must have node/npm installed (see installation guide)

This was tested on node version v18.13.0

First from the command line in the route of the project, install all required node modules

npm i

To start the program run from the command line in the route of the project

npm start

Requirements

  • Creates a forecourt with lanes and pumps outlined in the spec
  • Creates a queue for entering the forecourt
  • Creates random Vehicle with defined parameters at a random interval between 1500ms to 2200ms and adds the vehicle to the queue
  • Maximum number of vehicles in the queue outlined in spec
  • Processes the queue assigning the vehicle to an available pump, takes into account blocking if a pump at the back is taken
  • Fuel car to level at dispensing interval outlined in spec
  • Accounts for drivers agitation to drop vehicle off if not entering the forecourt within a randomly generated time between 1 and 2 seconds
  • Keeps a running total of vehicles serviced
  • Keeps of running total of litres dispatched
  • Keeps a running total of vehicles that left before fueling
  • Keep detailed list of each fueling transaction, outlined in spec

Completed

  • Creates a forecourt with lanes and pumps outlined in the spec
  • Creates a queue for entering the forecourt
  • Creates random Vehicle with defined parameters at a random interval between 1500ms to 2200ms and adds the vehicle to the queue
  • Maximum number of vehicles in the queue outlined in spec
  • Processes the queue assigning the vehicle to an available pump
  • Keeps a running total of vehicles serviced
  • Keeps a running total of vehicles that left before fueling
  • Keep detailed list of each fueling transaction, outlined in spec

TODO

  • Take into account blocking if a pump at the back is taken
  • Accounts for drivers agitation to drop vehicle off if not entering the forecourt within a randomly generated time between 1 and 2 seconds
  • Keep running total of litres dispatched
  • Fuel car to level at dispensing interval outlined in spec

ds-test's People

Watchers

Dan Reil 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.