编写Student类,编写它的属性:姓名name、学号stuNo、性别sex、班级stuClass、成绩sorce,方法:study。在方法中显示:“姓名:***,学号:***,性别*,班级***,成绩****”。编写测试类StudentTest,打印学生信息
public class Student {
String name;
String stuNo;
String sex;
int stuClass;
double sorce;
void study(String name,String sex,String stuNo,int stuClass,double sorce){
System.out.println(name+" "+stuNo+" "+sex+" "+stuClass+"班 "+sorce);
}
}
public class StudentText {
public static void main(String[] args) {
Student studen=new Student();
studen.study("天明","1213123113","男",3,100.0);
}
}