public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		char loop = 'y';
		while (loop == 'y'){

			int[] itemNumber = {1,2,3,4};
			double[][] itemArray = new double[2][4];
			double[] unitValue = new double[4];
		
			double bagMaxWeight = 0;//Maximum weight bag can hold defined by user
			double totalValue = 0;//The value of all things put inside knapsack

			boolean bError = true;
			DecimalFormat df = new DecimalFormat("0.00");
			Scanner scan = new Scanner(System.in);

			System.out.println("---------GREEDY KNAPSACK (FRACTIONAL)---------");
		
			fillItemArr(itemArray, itemNumber, bError, scan);//Fills items with weights and costs
			calcUnitValue(unitValue, itemArray);//Calculates the value of each item
			printTable(itemArray, itemNumber, unitValue, df);//Prints item list and value list
		
			System.out.print("\nPlease enter the max weight knapsack can hold (lbs): ");

			bError = true;
			while(bError){//While loop gets proper array size from user
				if(scan.hasNextDouble()){
					bagMaxWeight = scan.nextDouble();
				}
				else{
					System.out.print("Weight must be a data type 'double': ");
					scan.next();
					continue;
				}
				bError = false;
			}
		
			bubbleSort(unitValue, itemArray, itemNumber, bagMaxWeight, df);//Sorts values descending order
			fillKnapsack(totalValue, bagMaxWeight, itemArray, unitValue, itemNumber, df);//Fills knapsack 

			System.out.print("Do you wish to run the program again?(y or n): ");
			loop = reader.next().trim().charAt(0);
		}
		reader.close();
	}