package 任务点4;
public class Student {
String name;
String gender;
int id;
int stu_id;
String dept;
float scorejava1;
int age;
float scoremath;
float scoreenglish;
float scorejava;
Student(String name,String gender,int id,int stu_id,int age,String dept,float scoremath,float scoreenglish,float scorejava)
{this();//调用默认构造方法
this.name=name;
this.gender=gender;
this.id=id;
this.stu_id=stu_id;
this.age=age;
this.scoremath=scoremath;
this.scoreenglish=scoreenglish;
this.scorejava=scorejava;
}
public Student() {
// TODO Auto-generated constructor stub
}
void show(){
System.out.println("学生"+this.name+","
+"性别:"+this.gender+"id:"+this.id+"学号:"+this.stu_id
+"年龄:"+this.age+","+"数学成绩是:"
+this.scoremath+","+"英语成绩是:"+this.scoreenglish
+"java成绩是:"+this.scorejava);}
public static void main(String args){
Student h1=new Student("lisa","female",18,1234,1,"N", 90,90,90);
h1.show();
Student h2=new Student("John","male",18,4321,2,"N", 80,80,80);
h2.show();
}
}