请完成下列Java程序。程序的执行结果是生成一个具有一个TextField类型的对象

题型:问答题

问题:

请完成下列Java程序。程序的执行结果是生成一个具有一个TextField类型的对象in、Button类型的对象btn和Label类型的对象out图形用户界面,程序的功能是计算用户输入数的平方。

注意:请勿改动main()主方法和其他已有的语句内容,仅在下划线处填入适当的语句。 import java.awt.*; import java.awt.event.*; public class PingFangShu{public static void main(String args[ ] ){______________________} } class AppFrame extends Frame{TheAdapterTest listener=new TheAdapterTest();TextField in=new TextField(5);Button btn=new Button("计算");Label out=new Label ("用于显示计算结果"); public AppFrame(){setLayout(new FlowLayout());add(in);add(btn);add(out);btn.addActionListener(new BtnActionAdapter());addWindowListener(listener);setSize(400,100);show(); } class BtnActionAdapter implements ActionListener{public void actionPerformed(ActionEvent e){ String s=in.getText(); double d= _________________________ double sq=d*d; out.setText(d+"的平方是: "+sq);} } class TheAdapterTest extends WindowAdapter { public void windowClosing(WindowEvent e) { System.exit(l); } } }

考点:计算机等级考试JAVA二级JAVA机试71
题型:问答题

Why must we pay taxes The answer is that the government needs money for many things, for example, to pay its soldiers, sailors and airmen, to build roads, bridges, offices, schools, etc, and to buy goods from abroad ; and only the people of the country can supply the money. One of the most important taxes is income-tax which a person pays according to the amount of his income, whether he is a merchant, a doctor, a lawyer, a shopkeeper, a miner or anything else. This is called a "direct" tax, because it is paid in money directly to the government. Another tax is paid on goods such as watches, jewelry, new clothes, tobacco, wine, etc, when they are brought into a country. Such a tax is paid as part of the price of these goods if they are late sold in shops. We call it "indirect" tax, because it is paid indirectly through the shopkeepers. People usually complain about having to pay taxes, but they forget that the money is spent on things that they and their families need. We need policemen to catch thieves, to see that men obey the laws, to direct traffic, etc, and they must be paid what they earn; children need education, and there must be schools and teachers; we want our streets to be kept clean, and the wages of men who do this kind of work have to be paid. Above all, the country must always be ready to defend itself against attacking enemies, and we can’t have an army without paying for it. Besides, if a country wants to develop, there are many other things to do... Taxes, therefore, cannot be avoided. We buy our food and clothes and pay for our amusements; but, there are several things that the State finds the money for, and that is necessary for us if our society is to continue. We have no real reason to complain, therefore, when we are asked to supply money to be spent for the good of ourselves and for our fellow-citizens.

Title: (46)
Governments need (47)
for many things to do
  • a. (48) its soldiers, sailors and airmen
  • b. (49) roads, bridges, offices, schools, etc
  • c. (50) goods from abroad
Kinds of taxes and tax-payers a. (51) , which is paid by people whose income is over a certain amountb. (52) , which is paid through the shopkeepers
The function of tax Guarantee the (53) and the (54) of a country
(55) Taxes can not be avoided

题型:问答题

下列各句中,与“古之人不余欺也”的句式特点不相同的一句是 [ ]

A.句读之不知,惑之不解

B.何以解忧?

C.予犹记周公之被逮,在丁卯三月之望

D.沛公安在?

题型:问答题

简述政策分析的过程。

题型:问答题

可与皮质醇增多症混淆的疾病有()

A.单纯性肥胖

B.2型糖尿病

C.酗酒兼有肝损害者

D.抑郁症

E.爱迪生病

题型:问答题

肺纹理主要由哪些结构组成()

A.支气管动、静脉和淋巴管

B.支气管

C.淋巴管

D.支气管动、静脉

E.肺动、静脉

更多题库