|
static void | main (String[] args) throws IOException |
|
Definition at line 71 of file Question2.java.
◆ getProblemSolver()
static ProblemSolver assignment1.Question2.getProblemSolver |
( |
| ) |
throws IOException |
|
inlinestaticprivate |
Definition at line 72 of file Question2.java.
72 {
73 InputStreamReader reader = new InputStreamReader(System.in);
74 BufferedReader buffer = new BufferedReader(reader);
75 int num_road_interchanges = Integer.parseInt(buffer.readLine());
76 int time_cost_in_road_switching = Integer.parseInt(buffer.readLine());
77 String[] time_TuenMunRoads = buffer.readLine().split(" ");
78 String[] time_CastlePeakRoads = buffer.readLine().split(" ");
79
80 return new ProblemSolver(num_road_interchanges ,
81 time_cost_in_road_switching, time_TuenMunRoads, time_CastlePeakRoads);
82 }
Referenced by assignment1.Question2.main().
◆ main()
static void assignment1.Question2.main |
( |
String[] | args | ) |
throws IOException |
|
inlinestatic |
Definition at line 83 of file Question2.java.
83 {
85 System.out.println("The minimum time needed is "
86 + Math.min(
87 problem.minimum_time_recursively(0,
88 0, new ArrayList<>(List.of(ProblemSolver.Road.TuenMunRoad))),
89 problem.minimum_time_recursively(0,
90 0, new ArrayList<>(List.of(ProblemSolver.Road.CastlePeakRoad)))
91 ) + "."
92 );
93 }
static ProblemSolver getProblemSolver()
References assignment1.Question2.getProblemSolver().
The documentation for this class was generated from the following file: