第1题:
第2题:
第3题:
阅读以下说明和java代码,将应填入(n)处的字句写在对应栏内。
[说明]
有若干教师,每个教师只有姓名,一个教师可以指导多名研究生;每名研究生有姓名和研究方向,程序最后输出每个教师指导的所有研究生的姓名和研究方向。
[Java程序]
public class Teacher {
String name;
int top=0;
Student[] student=new Student[20];
public Teacher() {}
public Teacher(String name) { this.name=name;}
boolean add(Student stu){
int len=this.student.length;
if (top<len-1) {
this.student[top]=siu;
(1);
return true;
}
else
return (2);
}
void disp(){
System.out.println(“指导老师"”+this.name);
System.out.println(“研究生:”);
for(int i=0;i<(3);i++){
System.out.println(“姓名:”+this.student[i].name+“\t研究方向:”+this.student[i]. search);
}
}
public static void main(String[] args){
Teacher t[]={new Teacher(“李明”),new Teacher(“王华”)};
Student s1 = new Student(“孙强”,“数据库”);
Student s2 = new Student(“陈文”,“软件工程”);
Student s3 = new Student(“章锐”,“计算机网络”);
if(! t[0].add(s1)) {System.out.println(“每个老师最多只能指导20个学生!”);}
if(! t[0].add(a2)) {System.out.println(“每个老师最多只能指导20个学生!”);}
if(! t[1].add(s3)) {System.out.println(“每个老师最多只能指导20个学生!”);}
for(int i=0;i<2;i++)
(4);
}
}
class (5) {
String name;
String search;
public Student(){}
public Student(String name,String search){
this.name=name;
this.search=search;
}
String getName(){return this.name;}
String getSearch(){return this.search;}
}
第4题:
第5题:
第6题:
第7题:
第8题:
B
Jack is a famous writer now.But he said he was not a good student when he was young.He was often late for class and didn’t like doing his homework. Sometimes he slept in class while the teacher was teaching.He didn't understand much, but he always thought he under-stood everything..
One day the teacher asked the students a question, "When John was ten years old, his brother was twenty. John is fifteen now and how old is his brother?" Jack answered, "That's easy. His brother is twice as old as John, so he is now thirty. "
Another time, the teacher in a science class asked, "When it thunders(打雷) , why do we always see the light before we hear the sound? "But, Miss White," said Jack quickly, "can't you .see our eyes are in front of our ears?"
The third time, the teacher in a biology class asked, "Why can fish swim in the water?" "But, Miss White," said Jack quickly, "don't you know fish can-t walk on land?"
( )26.Jack was not ________. when he was young.
A.strong
B.lazy
C.clever
D.well
第9题:
第10题: