I made this code to calculate numbers:
Code :import java.util.Random; public class Sorting { private double[] player; private int k=5; private int j=5; public void sort(){ player = new double[k]; for(int i=1;i<k;i++){ double tempp ; for(i=1;i<j;i++){ tempp = Math.random() * i; player[i]=tempp; System.out.println("Result "+i+"="+player[i]); } } } public static void main(String []args){ Sorting k=new Sorting(); k.sort(); }}
and the result is:
Code :Result 1=0.4529689730194949 Result 2=0.09643822768644617 Result 3=1.841047494651026 Result 4=2.1807153629323777
Now, I want to add a label from the biggest to the smallest result number labeled EXCELLENT, VERY GOOD, GOOD and BAD like this:
Code :Result 1=0.4529689730194949 labeled GOOD Result 2=0.09643822768644617 labeled BAD Result 3=1.841047494651026 labeled VERY GOOD Result 4=2.1807153629323777 labeled EXCELLENT
