Code Monkey home page Code Monkey logo

flightsearch's Introduction

Flight Search

The system can be compiled by mvn clean install This would also execute the unit tests.

The application is built using Java 8, Spring Boot 1.5.8, mockito 1.9.5.

The application can be executed through the main method of FlightsearchApplication.

As soon as the application is up and running, the application can be reached using a REST client.

The following POST request

{
  "time" : "06:00AM"
}

in http://localhost:8090/api/flight results in

{
    "flights": [
        {
            "flight": "Air Canada 8099",
            "departure": "7:30AM"
        },
        {
            "flight": "United Airline 6115",
            "departure": "10:30AM"
        }
    ],
    "additionalProperties": {}
}

Code Organization

The Code is a simple Spring Boot application with REST. There are three packages - web, business and domain. The web is a REST controller The business is the place the flight search algorithm resides The domain has Flight domain objects and the data source.

External Reference

The candidate had to make some external references. They are documented in the places. The most frequent sites are spring initializr, java api doc, maven repo, stackoverflow (to convert date to local time). The exact place of references are also mentioned in the code.

Limitation

When the time is between 12:00 AM to 12:59 AM (00:00 hours), the algorithm gets confused. The solution for this case could not be completed in the permitted timeline. However, the code works for the given time table.

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.