有两个文件Java_3.java和Java_3.html,其中Java_3.java

题型:填空题

问题:

有两个文件Java_3.java和Java_3.html,其中Java_3.java是不完整的。请在下画线处填入正确内容,然后删除下画线。请勿删除注释行和其他已有的语句内容。

题目要求:

利用switch语句完成画直线、矩形和椭圆的图形,程序先显示小程序和输入窗口如下:

当输入1、2、3中任意一个整数后,在小程序窗口中呈现相应的多个直线或多个矩形或多个椭圆的图形。

Java_3.java文件源程序:

import java.awt.Graphics;

import javax.swing.*;

public class Java_3 extends (1)

int choice;

public void init()

String input;

input=JOptionPane.showInputDialog("输入1去画直线\n"+"输入2去画矩形\n"+"输入3去画椭圆\n");

choice=Integer.parseInt( (2) );

public void paint( (3) )

for(int i=0; i<10; i++)

switch(choice)

case 1:

g.drawLine(10,10,250,10+i*10);

break;

case 2:

g.drawRect(10+i *10,10+i *10,50+i *10,50+i *10);

break;

case 3:

g.drawOval(10+i *10,10+i *10,50+i *10,50+i *10);

break;

default;

JOptionPane.showMessageDialog(null, "输入非法值");

Java_3.html文件源程序:

<html><applet code="Java_3.class" width=260 height=260></applet></html>

1()

考点:计算机等级考试JAVA二级JAVA机试
题型:填空题

When Susan White went back to high school a couple of years ago, she never had any thought about actually getting a high school diploma.

“I just wanted to learn more,” she said. But when she found out that many of her classmates were planning to graduate, Mrs. White recalled(回顾), “I said my young friends can graduate from high school, so can I.”

She seems to have been right. As soon as she finishes a history course, Mrs. White will graduate next month. And when she does, she will enter the record books as the oldest person ever to graduate from high school in the United States.

Mrs. White is 98 years old and nobody has finished high school at an older age.

Mrs. White dropped out of school(退学) in the 10th grade, but her ability to learn has clearly not been reduced after she left school for 80 years. Since going back to her studies, she has kept up a straight record that is the highest possible.

Now that she is about to get a diploma, Mrs. White has become a strong believer in getting a good education.

“I don’t like anyone dropping out of school,” she said. “It makes me mad when a person decides to leave school, because future generations(后代) will have to know even more than we do in order to survive(生存)”.Mrs. White sets a good example of lifelong study!

小题1:Mrs. White dropped out of school when she was about_____.

A.15.

B.18

C.20

D.10小题2:How many other students older than Mrs. White have got a school diploma?

A.None

B.One

C.Two

D.A few小题3:Which of the following is Not true?

A.Mrs. White has decided to graduate from high school.

B.Mrs. White has already got a high school diploma.

C.Mrs. White is the oldest person ever to graduate from high school in the US.

D.Mrs. White said that the young had to know more.

题型:填空题

方程x(x-1)=x的根是[ ]

A.x=2

B.x=-2

C.xl=-2,x2=0

D.x1=2,x2=0

题型:填空题

甲乙共同出资购买了一间房并出租给丙,租房期间甲欲转让自己的份额,乙与丙均表示愿意购买,应如何处理?

A.在同等条件下由乙优先购买

B.在同等条件下由丙优先购买

C.在同等条件下由甲决定卖给谁

D.在同等条件下由乙、丙共同购买,各享有一半的份额,形成共有

题型:填空题

变差系数Cυ反映随机变量的()特征。

A.离散

B.对称

C.位置

D.全部

题型:填空题

单个空调组件工作,且调节空气电门关断时,组件的输出温度是多少()

A.固定24度

B.三个区域温度选钮中选择最低的温度

C.三个区域温度选钮中选择中间的温度

D.三个区域温度选钮所选温度的平均值

更多题库