public static void main(String[] args) throws Exception {

		Algorithm algorithm = null;
		String buffer = "";
		WriteFile wf = new WriteFile(OUTPUT_FILE);

		for (int i = MIN_SIZE; i <= MAX_SIZE; i += 10) {
			int[] avg = new int[REPEAT];
			for (int j = 0; j < REPEAT; j++) {
				// *******************************************************
				algorithm = new QuickSortFacade(PRINT_RESULT, i, OPTION); // here
																			// change
																			// variant
				// *******************************************************
				Object result = algorithm.run();

				if (!algorithm.test(result)) {
					throw new Exception("BAD IMPLEMENTATION!");
				}

				if (AVERAGE)
					avg[j] = Integer.valueOf( algorithm.getTime());
				else {
					buffer = Integer.toString(i) + " " + algorithm.getTime()
							+ "\n";
					if(PRINT_RESULT)
						System.out.println("size: " + i + " time: "	+ algorithm.getTime());
					wf.writeString(buffer);
				}

			}
			if (AVERAGE) {
				buffer = Integer.toString(i) + " " + avg(avg) + "\n";
				if(PRINT_RESULT)
					System.out.println("size: " + i + " time: "	+ avg(avg));
				wf.writeString(buffer);
			}

		}

		wf.close();
	}