-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
26 lines (24 loc) · 886 Bytes
/
Main.java
File metadata and controls
26 lines (24 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import algorithm.IAlgorithm;
import algorithm.Algorithm;
import view.IView;
import view.View;
import utilities.IUtilities;
import utilities.Utilities;
public class Main {
public static void main(String[] args) {
createAlgorithmViewAndGUI(new int[]{0, 0});
}
public static void createAlgorithmViewAndGUI(int[] input){
// Creating algorithm and view objects and Assigning utilities to view and algorithm
IUtilities utilities = new Utilities();
IView view = new View(utilities);
IAlgorithm algorithm = new Algorithm(utilities, view, input);
// Assigning algorithm to view, vice-versa and algorithm and view to utilities
view.retrieveAlgorithm(algorithm);
utilities.retrieveAlgorithmView(algorithm, view);
// Start the GUI
if(input[0] == 0){
view.createAndShowGUI();
}
}
}