diff --git a/Dynamic Programming/TaskCosts.java b/Dynamic Programming/TaskCosts.java new file mode 100644 index 000000000..10e5457b6 --- /dev/null +++ b/Dynamic Programming/TaskCosts.java @@ -0,0 +1,118 @@ +package projectb; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +/** + * + * @author dimig + */ +public class TaskCosts { + + private Scanner scanner; + private File file; + + private int tasks; + private int vms; + + private int[][] vmsPer; + private int[][] vmsCom; + private int[][] costs; + + + private TaskCosts(String nameOfInputFile) throws FileNotFoundException{ + File file = new File(nameOfInputFile); + scanner = new Scanner(file); + tasks = scanner.nextInt(); + vms = scanner.nextInt(); + costs = new int[tasks][vms]; + vmsPer = new int[tasks][vms]; + vmsCom = new int[vms][vms]; + for(int i=0;i