class Person{
String name;
String sex;
int age;
void getInfo(String n,String s,int a)
{
name=n;
sex=s;
age=a;
}
void showInfo()
{
System.out.println(“姓名:”+name);
System.out.println(“性别:”+sex);
System.out.println(“年龄:”+age);
}
}
public class Student extends Person {
String id;
String school;
void setInfo(String num,String school_name)
{
id=num;
school=school_name;
}
void showInfo()
{
System.out.println(“学校:”+school);
System.out.println(“学号:”+id);
System.out.println(“姓名:”+name);
System.out.println(“性别:”+sex);
System.out.println(“年龄:”+age);
}
public static void main (String[] args) {
// TODO 自动生成的方法存根
System.out.println(“第一个人的信息”);
Student z=new Student();