Commit ce1b9c39 authored by IT17165662's avatar IT17165662

fixed errors

parent c2d3df3d
......@@ -98,7 +98,6 @@ double firstQuartile;
}
//find third quartile = 3/4(n+1)th element
double thirdQuartile;
public ArrayList<Object> ThirdQuartile(String [] a){
......@@ -157,16 +156,19 @@ double firstQuartile;
}
//--------------Third Quartile--------------------
//size of the arraylist
arraySize = invalue.length;
// add 1 to the array size
arraySize = arraySize + 1;
//divide it by 4
position = arraySize *3/ 4.00;
roundofPosition = (int) Math.round(position);
roundofPosition = (int) Math.round(position);
// we get 3 rd qua position
//match the position with array index
for (int i = 0; i < invalue.length; i++){
if ( i == roundofPosition-1){
thirdQuartile = invalue[i];
System.out.println("iqrthirdquartile:"+thirdQuartile);
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment