Added solution to problem 5

This commit is contained in:
2020-10-26 12:00:14 -04:00
parent e08a714687
commit a19249c00b
2 changed files with 107 additions and 1 deletions

View File

@@ -28,11 +28,12 @@ import { Problem1 } from "./Problems/Problem1";
import { Problem2 } from "./Problems/Problem2";
import { Problem3 } from "./Problems/Problem3";
import { Problem4 } from "./Problems/Problem4";
import { Problem5 } from "./Problems/Problem5";
export class ProblemSelection{
//Holds the valid problem numbers
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4];
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5];
//Returns the problem corresponding to the given problem number
public static getProblem(problemNumber: number): Problem{
@@ -42,6 +43,7 @@ export class ProblemSelection{
case 2 : problem = new Problem2(); break;
case 3 : problem = new Problem3(); break;
case 4 : problem = new Problem4(); break;
case 5 : problem = new Problem5(); break;
}
return problem;
}