A.项目管理工作的进展
B.信息的加工过程
C.项目管理工作的任务
D.信息的内容属性
E.多维属性
第1题
如下程序是为变量i赋值。若程序的输出结果是180。请将程序补充完整。
注意:不改动程序结构,不得增行或删行。
class Base
{
int i;
Base()
{
add(10);
}
void add(int v)
{
i+=v;
}
void print()
{
System.out.println(i);
}
}
class Extension extends Base
{
Extension()
{
add(______);
}
void add(int v)
{
i+=v*2;
}
}
public class ConstructTest3
{
public static void main(String args[])
{
bogo(new Extension());
}
static void bogo(Base b)
{
b.add(60);
b.print();
}
}
第2题
下列Applet程序中,指定s为字符串类型,将s绘制在屏幕上,请将程序补充完整。
import java.applet.Applet;
import java.awt.Craphics;
public class testl8_1 extends Applet {
______String s;
public void init ()
{
s=new String("Hello World");
}
public Void______(Graphics g) {
g.______(s,10,25);
}
}
第3题
第4题
第5题
import java.util.*;
public class test17_1{
public static void main(String[] args){
__________s=new HashSet();
s.add("Hello");
s.add("World");
s.add(new Character('我'));
s.add(new Integer(23));
s.add("Hello");
__________as={"W","o","r","1","d"};
s.add(as);
s.add(null);
s.add(new Integer(23));
s.add(null);
System.out.println(__________);
第6题
第7题
设有如下程序。要使程序的输出结果n的值为5,请将程序补充完整。
Dim x As Integer,n As Integer
x=1
Do
x=x+3
n=n+1
Loop Until x=______
MsgBox"n="&n
第8题
下列程序中,分别计算1,2,3......,10的阶乘,并输出计算结果,请将程序补充完整。
程序运行结果如下:
1!=1
2!=2
3!=6
4!=24
5!=120
6!=720
7!=5040
8!=40320
9!=362880
10!=3628800
public class ex10_1 {
public static void main(String[]args) {
long 1 Factorial;
for(int i=1;i<=10;i++) {
_____________;
for(int j=2;___________;j++)
_____________;
System.out.println(i+ " ! =" + 1Factorial);
}
}
}
第9题
下列程序的输出结果为2,请将程序补充完整。
inelude<iostream.h>
using namespace std;
class Base
{
public:
______ void fun(){cout<<1;}
};
class Derived: public Base
{
pbulic:
void fubn(){cout<<2;}
};
int main()
{Base*P=new Derived;
P→fun();
delete P;
return 0;
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!