plxxxxxxxxxxx help me thts ma java assg for mean median and mode i have calculated some part of it for group data can any 1 help me to find out the rest offfffffff
String ans;
int total=0,small=0,large=0;
int numEntries=0;
float range=0.0f;
float wid = 0;
// user enters number
String message="";
do{
ans = JOptionPane.showInputDialog(null, "Enter a number between 1 and 1000");
if(ans==null || ans.trim().equals("")){
continue;
}
if("0".equals(ans)){
break;
}
int input = Integer.parseInt(ans);
if(input>=1 && input <=1000){
total = total + input;
if(input<small || numEntries==0){
small=input;
}
if(input>large || numEntries==0){
large=input;
}
numEntries++;
range = large - small;
}else{
message = "Enter number between 1 and 1000 only";
JOptionPane.showMessageDialog(null, message);
}
}while(true);
message = "The total is " + total + "\n";
message = message + "The range is " + range + "\n";
message = message + "The largest value is " + large + "\n";
message = message + "The smallest value is " + small + "\n";
JOptionPane.showMessageDialog(null, message);
String cls = JOptionPane.showInputDialog("Please enter No.of Classes");
int clas=Integer.parseInt(cls);
wid=range/clas;
JOptionPane.showMessageDialog(null, "the Width is:" + wid);
float a = small+wid;
float b = a+wid;
float c = b+wid;
float d = c+wid;
float e = d+wid;
String h=JOptionPane.showInputDialog("Enter class boundry value:");
Float cb = new Float(h);
float a1 = small-cb;
float a11= a+cb;
float b1 = b+cb;
float c1 = c+cb;
float d1 = d+cb;
float e1 = e+cb;
float e11=e1+cb;
float h1 =(small+a)/2;
float h2 =(a+b)/2;
float h3 =(b+c)/2;
float h4 =(c+d)/2;
float h5 =(d+e)/2;
JOptionPane.showMessageDialog(null,"the cb is:" + cb);
JOptionPane.showMessageDialog(null,"CLASSES"+"\t"+"||"+"CLASS BOUNDRY"+"||"+"X"+"\n"+"class A:"+"\t"+small+"--"+ a+ "||"
+a1+"---"+a11+"||"+h1 +"\n"+ "Class B:"+"\t"+a+"--"+ b+ "||"+a11+"---"+b1+"||"+h2+"\n"+
"Class C:"+"\t" +b+"--"+c+ "||"+b1+"---"+c1+"||"+h3+"\n"+ "Class D:"+"\t"
+c+"--"+d+ "||" +d1+"---"+e1 +"||"+h4+"\n"+"Class E:"+"\t" +d+"--"+e+ "||" +e1+"---"+e11+"||"+h5);