Complete day 1

This commit is contained in:
2024-12-09 20:23:56 -05:00
parent 955310d32b
commit 664a02115d
6 changed files with 1157 additions and 3 deletions

View File

@@ -7,12 +7,14 @@ import java.util.Scanner;
import java.util.StringJoiner;
import com.mattrixwv.adventOfCode24.days.Problem;
import com.mattrixwv.adventOfCode24.days.Problem1;
import com.mattrixwv.adventOfCode24.days.Problem2;
public class ProblemSelector{
private static final Scanner input = new Scanner(System.in);
//Holds the valid problem numbers
protected static final List<Integer> PROBLEM_NUMBERS = List.of(0);
protected static final List<Integer> PROBLEM_NUMBERS = List.of(0, 1, 2);
private ProblemSelector(){
@@ -24,9 +26,11 @@ public class ProblemSelector{
public static Problem getProblem(Integer dayNumber){
Problem day = null;
switch(dayNumber){
case 1 : day = new Problem1(); break;
case 2 : day = new Problem2(); break;
default: throw new InvalidParameterException();
}
//return day;
return day;
}
//Print the description of a problem