问题 阅读理解

A young father was visiting an old neighbor. They were standing in the old man’s garden, and talking about children. The young man said,“How strict should parents be with their children?”

   The old man pointed to(指着)a string (细绳) between a big strong tree and a thin young one.

  “Please untie (解开) that string.” said the old man. “But first pull the string tight so that(以便于)the young tree is straight again.” The young man did so. He untied the string and only found that the young tree bent(弯)over to one side.

  Then the old man said,“There, it is the same with children. You must be strict with them. But sometimes you must untie the string to see how they are getting on. If they are not yet able to stand alone,you must tie the string tight again. But when you find that they are ready to stand alone,you can take the string away.”

小题1:The story is about ____________.

      A. how to take care of young trees    

B. how strict parents should be with their children

C. how the young father should get on with his old neighbor

小题2: The young man untied the string ________________.

      A. in order to throw it away    

B. so that both of the trees wouldn’t grow straight

      C. and found that the young tree bent over to one side

小题3:When could the string be taken away?

      A. When the old man left.     

B. When the young man untied it next time.

     C. When the young tree grew strong enough.

小题4: At last the old man told the young man ________________.

      A. that he should be strict with his children if they could not 

stand alone

      B. that he should always be strict with his children

      C. that he should be hard on his children

小题5:We learn that the big strong tree and the thin young one are like _________.

A. the young father and the old neighbor     

B. parents and their children

       C. the old neighbor and the children of young father

答案

小题1:B

小题1:C

小题1:C

小题1:A

小题1:B

小题1:理解归纳题,根据文中语句理解可知。整篇文章主要是谈论怎样严格要求自己的孩子。故选B。

小题2:细节理解题,根据文中语句“He untied the string and only found that the young tree bent(弯)over to one side.”理解可知。年轻人把绳子解开后,他看到了小树弯到了另一边。故选答案C。

小题3:理解归纳题,根据文中语句理解可知。只有到小树长的比较直的时候才能解开绳子。故选C。

小题4:细节理解题,根据文中语句“But when you find that they are ready to stand alone,you can take the string away.”理解可知。当孩子能够单独站立时,我们可以让他独立。

小题5:理解归纳题,根据文中语句理解可知。文中的小树和大树就是指代小孩和大人,故选B。

问答题

本题的功能是用文本框来设定表盘中指针的位置。窗口中有一个画板和两个文本框,画板中绘制了一个表盘和时针、分针,通过文本框分别设定“时”和“分”,表盘中的时针和分针就会指到对应的位置上。
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
import javax.swing.event.*;
public class java3

public static void main(String[]args)

TextTestFrame frame=new TextTestFrame();
frame.setDefauhCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();


class TextTestFrame extends JFrame

public TextTestFrame()

setTitle("java3");
setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
Container contentPane=getContentPane();
DocumentListener listener=new DocurnentListener();
JPanel panel=new JPanel();
hourField=new JTextField("12",3);
panel.add(hourField);
hourField.getDocument().addDocumentListener(this);
minuteField=new JTextField("00",3);
panel.add(minuteField);
minuteField.getDocument().addDocumentListener(listener);
contentPane.add(panel,BorderLayout.SOUTH);
clock=new ClockPanel();
contentPane.add(clock,BorderLayout.CENTER);

public void setClock()

try

int hours
=Integer.parseInt(hourField,getText().trim());
int minutes
=Integer.parseInt(minuteField.getText().trim());
clock.setTime(hours,minutes);

catch(NumberFormatException e)

public static final int DEFAULT_WIDTH=300;
public static final int DEFAULT_HEIGHT=300;
private JTextField hourField;
private JTextField minuteField;
private ClockPanel clock;
private class clockFieldListener extends DocumentListener

public void insertUpdate(DocumentEvent e)setClock();
public void removeUpdate(DocumentEvent e)setClock();
public void changedUpdate(DocumentEvent e)

class ClockPanel extends JPanel

public void paintComponent(Graphics g)

super.paintComponent(g);
Graphics2D g2=(Graphics2D)g;
Ellipse2D circle
=new Ellipse2D.Double(0,0,2*RADIUS,2*RADIUS);
g2.draw(circle);
double hourAngle
=Math.toRadians(90-360*minutes/(12*60));
drawHand(g2.hourAngle,HOUR_HAND_LENGTH);
double minuteAngle
=Math.toRadians(90-360*minutes/60);
drawHand(g2,minuteAngle,MINUTE_HAND_LENGTH);

public void drawHand(Graphics2D g2,
double angle,double handLength)

Point2D end=new Poim2D.Double(
RADIUS+handLength*Math.cos(angle),
RADIUS-handLength*Math.sin(angle));
Point2D center=new Point2D.Double(RADIUS,RADIUS);
g2.draw(new Line2D.Double(center,end));

public void setTime(int h,int m)

minutes—h*60+m:
repaint();

private double minutes=0;
private double RADIUS=100;
private double MINUTE_HAND_LENGTH=0.8*RADIUS;
private double HOUR_HAND_LENGTH=0.6*RADIUS;

判断题