## How to A, B C, D, E,F change to 5,4,3,2,1,0 java

public class Main_2 {

static String[] deptCode = {"HRO", "FIN", "IT", "SALES"};
static String[] employeeID = {"1", "2", "3", "4", "5", "6", "7", "8"};
static char[][] marks = { {'F', 'D', 'C', 'B', 'C', 'B', 'C', 'A'}, // mark for HRO
{'D', 'B', 'A', 'A', 'F', 'B', 'C', 'C'}, // mark for FIN
{'D', 'B', 'E', 'B', 'C', 'F', 'F', 'D'}, // mark for IT
{'C', 'B', 'E', 'D', 'C', 'B', 'C', 'A'} }; // mark for SALES

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

// TODO code application logic here
int deptID = -1;

for (int i = 0; i < deptCode.length; i++) {
if (args[1].equals(deptCode[i])) {
deptID = i; ////// ******* //////
break;
}
}
double sum=0;
int maxID=0;
int nEmployee=employeeID.length;
for (int i=0; i < nEmployee; i++ ){
sum+=marks[deptID][i]; // add up all the marks for the department
if(marks[deptID][maxID]<marks[deptID][i]) maxID=i; // find student who has maximum
}
sum/=nEmployee; // calculate average
System.out.println("HRO: Average performance = " + sum); // output average
System.out.println("Max mark belongs to studentID = "+ maxID);
// output max mark

}

}