class Student
{
int number;
String name,sex;
Boolean master;
double math,chinese,english,score=0.0,average=0.0;
public Student(int num,String name,String sex,Boolean ma,double math,double chinese,double english){
this.number=num;
this.name=name;
this.sex=sex;
this.master=ma;
this.math=math;
this.chinese=chinese;
this.english=english;
}
double score(){
return math+chinese+english;
}
double ave(){
return score()/3;
}
}
public class xuesheng
{
public static void main(String[] args)
{
Student s=new Student(101,"kimi","man",true,90.0,90.0,90.0);
System.out.println("总分:"+s.score());
System.out.println("平均:"+s.ave());
}
}