Class App

java.lang.Object
de.bcxp.challenge.App

public final class App extends Object
The entry class for your solution. This class is only aimed as starting point and not intended as baseline for your software design. Read: create your own classes and packages as appropriate.
  • Field Details

  • Constructor Details

    • App

      public App()
  • Method Details

    • main

      public static void main(String... args)
      This is the main entry method of your program.
      Parameters:
      args - The CLI arguments passed
    • getBestMatchFromDocument

      private static String getBestMatchFromDocument(String path, IDocumentParser parser, IDocumentAnalyser analyser)
      Loads a document from the given file path using the provided parser, analyzes its entries to find the best match using the provided analyser, and returns the result.

      Since the provided main()-Method in App.java calls for only one value, an arbitrary value is pulled from the set of results. For example, if there are multiple days with equal temperature spreads, one arbitrary from this set of days is returned.

      Parameters:
      path - the file path to the document
      parser - the IDocumentParser that reads and parses the document into entries
      analyser - the IDocumentAnalyser that finds the best match from the parsed entries
      Returns:
      The ID of an arbitrary result from the result Set