public class person {
int age;String name;String gender;
public person(int Age,String Name,String Gender) {
=Age;
=Name;
=Gender;
}
public person(String string) {
// TODO Auto-generated constructor stub
}
public String toString() {
return"name:"+name+" gender:"+gender+" age:"+age;
}
public static class Teacher extends person{
private static final int Age = 0;
private static final String Gender = null;
private static final String Title = null;
private static final String Department = null;
String title; String department;
public Teacher(String Name) {
super(Age,Name,Gender);
=Title;
=Department;
}
public String toString() {
return ()+" title:"+title+" department:"+department;
}
}
public static class Student extends person{
private static final String Gender = null;
private static final int Age = 0;
private static final int Number = 0;
private static final int Time = 0;
private static final String Major = null;
int number;int time;String major;
public Student(String Name) {
super(Age,Name,Gender);
=Number;
=Time;
=Major;
}
public String toString() {
return ()+" number:"+number+" time:"+time+" major"+major;
}
}
public static void main(String a[]) {
Teacher person1=new Teacher("");
(person1);
Student person2=new Student("");
(person2);
}
}