class Teacher{
String name;
String school;
public Teacher(String name,String school){
this.name=name;
this.school=school;
}
public void lesson(){
}
public void introduction(){
System.out.println("我的名字叫:"+name+"我来自:"+school);
System.out.println("知识点讲解");
System.out.println("知识提问");
}
}
class Javateacher extends Teacher{
public Javateacher(String name,String school){
super(name,school);
}
public void lesson(){
System.out.println("启动JCreator");
super.lesson();
}
}
class Dotnetteacher extends Teacher{
public Dotnetteacher(String name,String school){
super(name,school);
}
public void lesson(){
System.out.println("启动C#");
super.lesson();
}
}
public class SomeStudents1{
public static void main(String args[]){
Javateacher t=new Javateacher("张三","山东外国语职业学院");
t.introduction();
t.lesson();
Dotnetteacher l=new Dotnetteacher("李四","安徽师范大学");
l.introduction();
l.lesson();
}
}