下面是一个Applet程序,其功能是用一组坐标点绘制一个多边形,并通过沿坐标的垂直方

题型:问答题

问题:

下面是一个Applet程序,其功能是用一组坐标点绘制一个多边形,并通过沿坐标的垂直方向移动,把它移到窗口的下半部分,然后填充它。请改正程序中的错误(有下划线的语句),使程序能输出正确的结果。 注意:不改动程序的结构,不得增行或删行。 程序运行结果如下:

import java.awt.*; import java.applet.*; /* <applet code="ex20_3.class" width=800 height=400 > </applet> */ public class ex20_3 extends Applet {int[] x = {15,50,100,160,120,190 };int[] y = {15,100,30, 15, 80, 50 );public void init() ( setBackground(Color.lightGray); } public void paint(Graphics g) { int[] y2 = new int[6]; g.setColor(Color.red); Rectangle rect = getBounds(); g.drawPolygon(x,y2,6); for(int i=0; i<6; i++) y2[i] = y[i] + (rect.height / 2); g.fillPolygon(x,y,6);} } ex20_3.html <HTML> <HEAD> <TITLE>ex20_3</TITLE> </HEAD> <BODY> <applet code="ex20 3.class" width=800 height=400 > </applet> </BODY> </HTML>

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

阅读理解。

    "The only thing holding you back is yourself. Never say never", said a rising 17-year-old singer, Justin

Bieber, who was just an ordinary boy in Canada a few years ago.

    After the accident of falling from the 18th floor and lying in the snow for three hours, my hands were

frozen and my spinal cord (脊髓)was seriously injured. All the doctors and professors in the famous

hospitals in Beijing told me that there was little chance for my hands and my body to recover (康复).

    After half a year of medical treatments and recovering exercises , I could not make any more progress

for over a year . What was worse , I suffered a lot from depression ( 绝望).On top of this , I suffered from insomnia , making every minute of the light seem to last forever. Hopelessly , mom and I came back to my hometown, which is small town in Guangdong.

    At that time , I thought that I would never be able to walk again. I would never love and be loved. I

would never be able to earn even a penny. I would never be able to repay the kindness I got from my

parents and many nice people . Life was meaningless.

    Now two years has passed.My hands are 80% recovered.I can even type faster than a healthy person ! Up to now, I have worked for a law firm as an interpreter for half a year already. Although I don’t earn as much as before, I am able to pay for the food and clothes I need. What’s more , I even have extra money

to buy thanksgiving presents for my parents and my boyfriend. Through my blogs( 博客) , many people

get to know me and like me.I can bring happiness to them. I can help those who are still suffering from

depression and the pain of illnesses by chatting with them….You see, I am living a meaningful life and I

am happier than ever I could have dreamed.

    So, my friends, never say never. As long as you are alive , there is always hope and possibilities. It is

never too late to take action to realize your dreams.           

1. What's the writer's present job?

A. A singer.              

B. A typist .              

C. A professor .    

D. An interpreter.

2. What does the underlined word " insomnia" in the third paragraph mean in Chinese?

A. 失眠                

B. 失忆                  

C. 麻木          

D. 低烧

3. All of the following words can be used to describe the writer's present life EXCEPT___________.

A. helpful              

B. meaningful              

C. painful        

D. hopeful

4. According to the passage, which of the following statements about the writer is TRUE?

A. She gets a lot of help through her blogs.          

B. She is in love with a young man at present.

C. She got medical treatment soon after the accident.  

D. She had no job and earned little before the accident.

题型:问答题

ELISA板包被后,最常用的封闭物质是()

A.人清蛋白

B.人球蛋白

C.牛血清清蛋白

D.牛血清球蛋白

E.鼠清蛋白

题型:问答题

哪一个不是分时系统的基本特征

A.同时性

B.独立性

C.实时性

D.交互性

题型:问答题

警告()次扣一分。

A、两次

B、一次

C、三次

题型:问答题

湿蒸汽经绝热节流后,()不变。

A.压力

B.比焓

C.比熵

D.都不对

更多题库