added quadratic search method and accompanying code in the main method