问题 阅读理解

阅读理解。

     Different countries and different people have different manners. We must find out their customs so that

they will not think us impolite. Here are examples of the things that a person with good education does or

does not do.

     If you visit a Chinese family, you should knock at the door first. When the door opens, you will not move

before the host says "Come in, please." After you enter the room, you would not sit down until the host asks

you to take a seat. When a cup of tea is put on a tea table before you or sent to your hand, you will say "Thank

you" and receive it with two hands, not one hand, or they will think you have ill manners. Before entering a

house in Japan, it is a good manner to take off your shoes. In European countries, even though shoes sometimes

become very dirty, this is not done. In a Malay (马来人的) house, a visitor never finishes the food on the table.

He leaves a little to show that he has had enough. In England, a visitor always finished a drink or the food to

show that he has enjoyed it. This will make the host pleased.

1. According to the passage, people have different _______ in different countries.

A. manners

B. houses

C. families

2. It's _______ to sit down immediately after you enter the room in China.

A. important

B. polite

C. impolite

3. "ill manners" means _______ in Chinese.

A. 得体的举止

B. 无礼的举止

C. 文明的行为

4. Before entering the house in Japan, it is a good'manner to take off _______.

A. coats

B. gloves

C. shoes

5. Which is the best title of the passage?

A. Manners in Different Countries

B. People in Different Countries

C. Foods in Different Countries

答案

1. A 2. C 3. B 4. C 5. A

问答题

注意:下面出现的“考生文件夹”均为%USER%。

在考生文件夹中存有文件名为Java_3.java的文件,该程序是不完整的,请在注释行“//**********Found**********”下一行语句的下画线地方填入正确内容,然后删除下面线,请勿删除注释行或改动其他已有语句内容。存盘时文件必须存放在考生文件夹下,不得改变原有文件的文件名。

本题的要求是:

下面是整数除法计算的程序,要求在出现异常时,能抛出异常信息。

考虑两种异常:

(1)输入非数字除数。

(2)输入除法分母为零。

该程序运行的三种结果状态如下:

(1)输入两个合法整数:

(2)输入非数字除数:

(3)输入除数为零:

给定源程序:

import java.text.DecimalFormat;

import javax.swing.*;

import java.awt.*;

import Java.awt.event.*;

//*********Found********

public class Java_3 extends______implements ActionListener

private JTextField input1, input2, output;

private int number1.number2;

private double result;

//初始化

public Java_3()

//*********Found********

______("示范异常");

Container c=getContentPane();

c.setLayout(new GridLayout(3, 2));

c.add(new JLabel("输入分子",

SwingConstants.RIGHT));

input1=new JTextField(10);

c.add(input1);

c.add(

new JLabel("输入分母和回车",

SwingConstants.RIGHT));

input2=new JTextField(10);

c.add(input2);

input2.addActionListener(this);

c.add(new JLahel("计算结果",SwingConstants RIGHT));

output=new JTextField();

c.add(output);

setSize(425, 100);

show();

//处理GUI事件

public void actionPerformed(ActionEvent e)

DecimalFormat precision3=new DecimalFormat("0.000");

output.setText("");//空的JTextField输出

//*********Found********

______

number1=Integer.parseInt(input1.getText());

number2=Integer.parseInt(input2.getText());

result=quotient(number1,number2);

//*********Found********

output.setText(______);

catch(NumberFormatException nfe)

JOptionPane showMessageDialog(this,

"你必须输入两个整数",

"非法数字格式",

JOptionPane.ERROR_MESSAGE);

catch(Exception dbze)

//*********Found********

______(this,

"除法异常",

"除数为零",

JOptionPane.ERRORMESSAGE);

//定义求商的方法,如遇除数为零时,能抛出异常

public double quotient(int numerator, int denominator)

throws Exception

if(denominator==0)

throw new Exception();

return(double)numerator/denominator;

public static void main(String args[])

Java_3 app=new Java_3();

app.addWindowListener(

new windowAdapter()

public void windowClosing(WindowEvent e)

e.getWindow().dispose();

ystem exit(0);

);

/*JOptionPane类的常用静态方法如下:

showInputDialog()

showConfirmDialog()

showMessageDialog()

showoptionDialog()

*/

单项选择题