Giter Site home page Giter Site logo

room-occupancy-api's Introduction

Tools

  • Download and install the Java Development Kit 11. You can download it from: here
  • Download and install Maven 3. You can download it from: here
  • Using Lombok, so it is recommended to add a Lombok plugin to your IDE, but not mandatory.

Build

  • Build the application with the following command in the root directory of project: mvn clean install
  • You can build the application without tests too with the following command in the root directory of project: mvn clean install -DskipTests

Start the application

  • You can reach the application by the following url: localhost:8080 or by the following Ip-address 127.0.0.1 example
  • If no rates provided via the post post endpoint then the get endpoint will always return NOT FOUND response

Assumptions

  • I was not sure about how the system will receive the customer rates. So I have created a separate endpoint
  • I was not sure if the system will receive more GET booking estimates requests OR more POST requests to persist customer rates. So, my assumptions are as below:
    • Persists the rates as it receives at POST rates request without any extra processing (as currently implemented)
      • Always does extra processing on rates at each GET estimates request
    • Second option can be:
      • Organise/sort the rates on each POST customer rates request
      • Just calculates the estimates from the organised rates for each GET estimates request
  • Keeping the rates as list in the service is not a good practice and thread unsafe but in real project we should be loading it from some persisted place. So keeping it in service for the assignment

room-occupancy-api's People

Watchers

James Cloos avatar Waqar Ahmad Babar 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.