import java.util.Scanner; /** * Read the input */ public class Solution { /** * Gets data from standard input */ private Scanner input; /** * Start the execution of the solution * @param args Command line arguments */ public static void main(String args[]) { Solution solution = new Solution(); solution.run(); } /** * Run the solution. This method is called from main() */ public void run() { // Create object to read data from standard input input = new Scanner(System.in); Classifier classifier = new Classifier(); // This code replicates the input to the standard output while ( input.hasNext() ) { //Identifies the symbol "/" as a delimiter. input.useDelimiter("[/,\\s]"); /** *Assign a variable to the given date *To later on classify the given data according to the vacation(high) season and the rest of the year. */ int day = input.nextInt(); int month = input.nextInt(); long year = input.nextLong(); //In order to classify the data according to the store name. String storeLocation = input.next(); //Incomes of a certain store in a certain date. long incomesPerDay = input.nextLong(); /** *Classify by store location */ if (storeLocation.equals(Carrillo)){ //Store location equals Carrillo /** *Classify according to the season *Vacation season(temporada alta) = from month 12 to 4, and month 7. *Normal season(temporada baja) = from month 5 to 11, but 7. */ if ((month <= 12 && month >= 4)||(month == 7)){ /** *Vacation season. *Subroutine for the vacation season. *Addition of all the given incomes in the current season. */ Classifier.getVacationSeason(incomesPerDay); } else{ /** *Normal season. *Subroutine for the normal season. *Addition of all the given incomes in the current season. */ Classifier.getNormalSeason (incomesPerDay); } } else if(storeLocation.equals(Liberia)){ //Store location equals Liberia /** *Classify according to the season *Vacation season(temporada alta) = from month 12 to 4, and month 7. *Normal season(temporada baja) = from month 5 to 11, but 7. */ if ((month <= 12 && month >= 4)||(month == 7)){ /** *Vacation season. *Subroutine for the vacation season. *Addition of all the given incomes in the current season. */ Classifier.getVacationSeason(incomesPerDay); } else{ /** *Normal season. *Subroutine for the normal season. *Addition of all the given incomes in the current season. */ Classifier.getNormalSeason (incomesPerDay); } } else { //Store location equals Sardinal /** *Classify according to the season *Vacation season(temporada alta) = from month 12 to 4, and month 7. *Normal season(temporada baja) = from month 5 to 11, but 7. */ if ((month <= 12 && month >= 4)||(month == 7)){ /** *Vacation season. *Subroutine for the vacation season. *Addition of all the given incomes in the current season. */ Classifier.getVacationSeason(incomesPerDay); } else{ /** *Normal season. *Subroutine for the normal season. *Addition of all the given incomes in the current season. */ Classifier.getNormalSeason (incomesPerDay); } } /** *Classify according to the season *Vacation season(temporada alta) = from month 12 to 4, and month 7. *Normal season(temporada baja) = from month 5 to 11, but 7. */ if ((month <= 12 && month >= 4)||(month == 7)){ /** *Vacation season. *Subroutine for the vacation season. *Addition of all the given incomes in the current season. */ Classifier.getVacationSeason(incomesPerDay); } else{ /** *Normal season. *Subroutine for the normal season. *Addition of all the given incomes in the current season. */ Classifier.getNormalSeason (incomesPerDay); } } // Close the standard input input.close(); } }//Class solution. /** * * */ class Classifier { public static long getVacationSeasonCarrillo (Long incomesPerDay){ long result = 0; result += incomesPerDay; } public static long getNormalSeasonCarrillo (long incomesPerDay){ long result = 0; result += incomesPerDay; return result; } public static long getVacationSeasonLiberia (Long incomesPerDay){ long result = 0; result += incomesPerDay; } public static long getNormalSeasonLiberia (long incomesPerDay){ long result = 0; result += incomesPerDay; return result; } public static long getVacationSeasonSardinal (Long incomesPerDay){ long result = 0; result += incomesPerDay; } public static long getNormalSeasonSardinal (long incomesPerDay){ long result = 0; result += incomesPerDay; return result; } public void getTotal(String storeName){ } }