/**
 * Copyright 2017 Goldman Sachs.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package utility;

/**
 * Utility class to validate inputs
 */
public class InputValidator {

    // TODO - write a method that will validate your JSON input files

    // TODO - write a method that will validate the inputs to the Company Resource

    // TODO - write a method that will validate the inputs to the Stock Resource

}

@@ -627,16 +627,35 @@
 tility;%0D
+%0Aimport date thing%0D
 %0A%0D%0A/**%0D%0A
@@ -728,13 +728,1542 @@
 tor 
+%0D%0A
 %7B%0D%0A%0D%0A
+    public static boolean validateFile(String fileName)%0D%0A    %7B   %0D%0A        if(fileName.equals(%22companyInfo.json%22)) %0D%0A        %7B%0D%0A            return true;%0D%0A        %7D%0D%0A        else if(fileName.equals(%22historicalStockData.json%22))%0D%0A        %7B%0D%0A            return true;%0D%0A        %7D%0D%0A        else%0D%0A        %7B%0D%0A            return false;%0D%0A        %7D%0D%0A    %7D%0D%0A    public static boolean validateCompany(String stockTicker)%0D%0A    %7B%0D%0A        List%3CString%3E stockTickers;%0D%0A        stockTickers = getAllSymbols(%22companyInfo.json%22); %0D%0A        if(stockTickers.contains(stockTicker))%0D%0A        %7B%0D%0A            return true;%0D%0A        %7D%0D%0A        else%0D%0A        %7B%0D%0A            return false;%0D%0A        %7D%0D%0A    %7D%0D%0A    public static boolean validateStock(String stockTicker, String startDate, String endDate)%0D%0A    %7B%0D%0A        boolean check = true;%0D%0A        List%3CString%3E stockTickers, dates;%0D%0A        stockTickers = readAllStockTickers(%22historicalStockData.json%22); %0D%0A        dates = readAllDates(%22historicalStockData.json%22); //do method%0D%0A%0D%0A        if(!stockTickers.contains(stockTicker))%0D%0A        %7B%0D%0A            check = false;%0D%0A        %7D%0D%0A        if(!dates.contains(startDate) %7C%7C !dates.contains(endDate))%0D%0A        %7B%0D%0A            check = false;%0D%0A        %7D%0D%0A        %0D%0A        SimpleDateFormat format = new SimpleDateFormat(%22dd-MM-yyyy%22);%0D%0A%0D%0A        Date start = format.parse(startDate);%0D%0A        Date end = format.parse(endDate);%0D%0A%0D%0A            if (end.compareTo(start) %3C 0) %7B%0D%0A                check = false;%0D%0A            %7D%0D%0A%0D%0A        %7D%0D%0A        return check;%0D%0A    %7D%0D%0A
     

Update InputValidator.java