Person类代码:
package Less1;
public class Person {
private String name, add, tel, ema;
public Person(){}
public Person(String names,String add, String tel, String ema){
this.name = names;
this.add = add;
this.tel = tel;
this.ema = ema;
};
public String toString(){
return "Person" +" "+ name + add + tel + ema;
}
}
Student类代码:
public class Student extends Person{
private int grade;
public Student(){}
int bj;
public