class fact
{
double m1,m2,m3,m4,avg,total;
void getdata(double a,double b,double c,double d)
{
m1=a;
m2=b;
m3=c;
m4=d;
total=m1+m2+m3+m4;
avg=(total/4);
}
}
class jlab2873
{
public static void main(String args[])
{
fact fact1=new fact();
fact1.getdata(23,23,12,34);
System.out.println("student total=" + fact1.total + "\n student avg=" + fact1.avg);
}
}
{
double m1,m2,m3,m4,avg,total;
void getdata(double a,double b,double c,double d)
{
m1=a;
m2=b;
m3=c;
m4=d;
total=m1+m2+m3+m4;
avg=(total/4);
}
}
class jlab2873
{
public static void main(String args[])
{
fact fact1=new fact();
fact1.getdata(23,23,12,34);
System.out.println("student total=" + fact1.total + "\n student avg=" + fact1.avg);
}
}