Code Test

Question 1: Solution is done in java it can be found HERE

Requirements to run the solution

  1. Java jdk or jre or any jvm installed on your pc. Can be installed from this LINK.
  2. Any of your favourite Java IDE. This solutions were written using Intellij IDE.
  3. Basic level ide knowledge to just import project and run the code.

To run solution

  1. Import or open the source code in any java ide software.
  2. Navigate to DartSolution>src
  3. click Main to open file in workspace area.
  4. Click run.
  5. Solution is in Darts.java Class.

Question 2: Solution is also done in java it can be found HERE

Knapsack solution Requirements to run the solution

  1. Java jdk or jre or any jvm installed on your pc. Can be installed from this LINK.
  2. Any of your favourite Java IDE. This solutions were written using Intellij IDE.
  3. Basic level ide knowledge to just import project and run the code.

To run solution

  1. Import or open the source code in any java ide software.
  2. Navigate to Knapsack>src
  3. click Knapsack.java to open file in workspace area.
  4. You can change the values and the weights. int val[] and int wt[] arrays and also the max weight w.
  5. Run the code to get the highest value the thief can carry
  6. Implementation is in ComputeKnapsack class.

Question 3: Querying the SwapiAPI

Swapi API Requirements to run the solution

  1. PHP preferably version 5+ installed on your pc since this has been done using php
  2. Basic php knowledge.
  3. apache or nginx web server installed on your pc to run the source code from.
  4. Web browser to run the code
  5. internet connection to get bootstrap dependencines loaded.
  6. Any code editor

To run solution

  1. pull the source code, put it in htdocs if using xampp.
  2. Start your apache web server
  3. on the browser open http://localhost/swapi/
  4. you can be able to clisk and test the functionalities .

Borrowing friends Requirements to run the solution

  1. Python runtime.
  2. Any code editor that supports python.
  3. Basic python knowledge

To run solution

  1. pull the source code, put it in any location in your pc.
  2. navigate to the location.
  3. run python rest_api_test.py

alternatively

  1. open code in any python supported code editor.
  2. open rest_api_test.py
  3. Run the code